diff options
Diffstat (limited to 'ssh-dss.c')
-rw-r--r-- | ssh-dss.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-dss.c,v 1.24 2006/11/06 21:25:28 markus Exp $ */ | ||
1 | /* | 2 | /* |
2 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
3 | * | 4 | * |
@@ -23,14 +24,17 @@ | |||
23 | */ | 24 | */ |
24 | 25 | ||
25 | #include "includes.h" | 26 | #include "includes.h" |
26 | RCSID("$OpenBSD: ssh-dss.c,v 1.19 2003/11/10 16:23:41 jakob Exp $"); | 27 | |
28 | #include <sys/types.h> | ||
27 | 29 | ||
28 | #include <openssl/bn.h> | 30 | #include <openssl/bn.h> |
29 | #include <openssl/evp.h> | 31 | #include <openssl/evp.h> |
30 | 32 | ||
33 | #include <stdarg.h> | ||
34 | #include <string.h> | ||
35 | |||
31 | #include "xmalloc.h" | 36 | #include "xmalloc.h" |
32 | #include "buffer.h" | 37 | #include "buffer.h" |
33 | #include "bufaux.h" | ||
34 | #include "compat.h" | 38 | #include "compat.h" |
35 | #include "log.h" | 39 | #include "log.h" |
36 | #include "key.h" | 40 | #include "key.h" |
@@ -157,8 +161,9 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen, | |||
157 | fatal("ssh_dss_verify: BN_new failed"); | 161 | fatal("ssh_dss_verify: BN_new failed"); |
158 | if ((sig->s = BN_new()) == NULL) | 162 | if ((sig->s = BN_new()) == NULL) |
159 | fatal("ssh_dss_verify: BN_new failed"); | 163 | fatal("ssh_dss_verify: BN_new failed"); |
160 | BN_bin2bn(sigblob, INTBLOB_LEN, sig->r); | 164 | if ((BN_bin2bn(sigblob, INTBLOB_LEN, sig->r) == NULL) || |
161 | BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s); | 165 | (BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s) == NULL)) |
166 | fatal("ssh_dss_verify: BN_bin2bn failed"); | ||
162 | 167 | ||
163 | /* clean up */ | 168 | /* clean up */ |
164 | memset(sigblob, 0, len); | 169 | memset(sigblob, 0, len); |