From f8f93869537c880f8d74cdf06b9d563b3e2ef466 Mon Sep 17 00:00:00 2001 From: "Angelos D. Keromytis" Date: Tue, 5 Jun 2001 05:08:27 +0000 Subject: Add back check for found/not found public key to use for verification (somehow was dropped during the previous commit). --- sbin/isakmpd/ike_auth.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sbin/isakmpd/ike_auth.c') 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) { -- cgit v1.2.3