summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/ike_auth.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-05 05:08:27 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-05 05:08:27 +0000
commitf8f93869537c880f8d74cdf06b9d563b3e2ef466 (patch)
tree3b39de36e6e2ffe7251abc3e24aafffb835e9117 /sbin/isakmpd/ike_auth.c
parentd6c5a96bbc4a14c735ff77adc124f3d49195bb2c (diff)
Add back check for found/not found public key to use for verification
(somehow was dropped during the previous commit).
Diffstat (limited to 'sbin/isakmpd/ike_auth.c')
-rw-r--r--sbin/isakmpd/ike_auth.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sbin/isakmpd/ike_auth.c b/sbin/isakmpd/ike_auth.c
index 4ec821e0a07..6dea4606ba2 100644
--- a/sbin/isakmpd/ike_auth.c
+++ b/sbin/isakmpd/ike_auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike_auth.c,v 1.41 2001/05/31 20:29:49 angelos Exp $ */
+/* $OpenBSD: ike_auth.c,v 1.42 2001/06/05 05:08:26 angelos Exp $ */
/* $EOM: ike_auth.c,v 1.59 2000/11/21 00:21:31 angelos Exp $ */
/*
@@ -553,10 +553,10 @@ rsa_sig_decode_hash (struct message *msg)
struct exchange *exchange = msg->exchange;
struct ipsec_exch *ie = exchange->data;
struct payload *p;
- void *cert;
+ void *cert = 0;
u_int8_t *rawcert = NULL;
u_int32_t rawcertlen;
- RSA *key;
+ RSA *key = 0;
size_t hashsize = ie->hash->hashsize;
char header[80];
int len;
@@ -783,6 +783,12 @@ rsa_sig_decode_hash (struct message *msg)
}
#endif /* USE_DNSSEC */
+ if (!found)
+ {
+ log_print ("rsa_sig_decode_hash: no public key found");
+ return -1;
+ }
+
p = TAILQ_FIRST (&msg->payload[ISAKMP_PAYLOAD_SIG]);
if (!p)
{