summaryrefslogtreecommitdiff
path: root/ssh-dss.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:09:22 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:09:22 +1100
commitda7551677b301c6fd063eb162c7d32b37723a360 (patch)
treeee731b658802d003930540958f0b7ffc5a4a12bf /ssh-dss.c
parent154dda73a858a5924c2f5684dfec3e377cc3ab5d (diff)
- markus@cvs.openbsd.org 2001/12/27 18:22:16
[auth1.c authfile.c auth-rsa.c dh.c kexdh.c kexgex.c key.c rsa.c scard.c ssh-agent.c sshconnect1.c sshd.c ssh-dss.c] call fatal() for openssl allocation failures
Diffstat (limited to 'ssh-dss.c')
-rw-r--r--ssh-dss.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ssh-dss.c b/ssh-dss.c
index 30bd1f8cb..bd709a226 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: ssh-dss.c,v 1.10 2001/12/05 10:06:12 deraadt Exp $"); 26RCSID("$OpenBSD: ssh-dss.c,v 1.11 2001/12/27 18:22:16 markus Exp $");
27 27
28#include <openssl/bn.h> 28#include <openssl/bn.h>
29#include <openssl/evp.h> 29#include <openssl/evp.h>
@@ -158,9 +158,12 @@ ssh_dss_verify(
158 } 158 }
159 159
160 /* parse signature */ 160 /* parse signature */
161 sig = DSA_SIG_new(); 161 if ((sig = DSA_SIG_new()) == NULL)
162 sig->r = BN_new(); 162 fatal("ssh_dss_verify: DSA_SIG_new failed");
163 sig->s = BN_new(); 163 if ((sig->r = BN_new()) == NULL)
164 fatal("ssh_dss_verify: BN_new failed");
165 if ((sig->s = BN_new()) == NULL)
166 fatal("ssh_dss_verify: BN_new failed");
164 BN_bin2bn(sigblob, INTBLOB_LEN, sig->r); 167 BN_bin2bn(sigblob, INTBLOB_LEN, sig->r);
165 BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s); 168 BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s);
166 169