diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:38:40 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:38:40 +0000 |
commit | 1b816ea846aca3ee89e7995373ace609e9518424 (patch) | |
tree | b41cdc8495cae7fa9c2e0f98a5f2e71656b61f9a /ssh-dss.c | |
parent | fa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (diff) | |
parent | 086ea76990b1e6287c24b6db74adffd4605eb3b0 (diff) |
import openssh-4.6p1-gsskex-20070312.patch
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); |