summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-25 04:42:20 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-25 04:42:20 +0000
commit5363aee8bd91095c9a420625500e4fd5983349ae (patch)
treed716d5ee5cc3455d106d408dcace7b8020da1a52 /key.c
parenta4789ef8785c4ac37187cf3b9b937524d2823b4b (diff)
- markus@cvs.openbsd.org 2001/06/23 05:26:02
[key.c] handle sigature of size 0 (some broken clients send this).
Diffstat (limited to 'key.c')
-rw-r--r--key.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/key.c b/key.c
index 3b9f9f78..84306a9b 100644
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: key.c,v 1.25 2001/04/17 10:53:24 markus Exp $");
+RCSID("$OpenBSD: key.c,v 1.26 2001/06/23 05:26:02 markus Exp $");
#include <openssl/evp.h>
@@ -768,6 +768,9 @@ key_verify(
u_char *signature, int signaturelen,
u_char *data, int datalen)
{
+ if (signaturelen == 0)
+ return -1;
+
switch(key->type){
case KEY_DSA:
return ssh_dss_verify(key, signature, signaturelen, data, datalen);