summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/ike_auth.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/isakmpd/ike_auth.c b/sbin/isakmpd/ike_auth.c
index e5ab1433067..11d7e6cf90b 100644
--- a/sbin/isakmpd/ike_auth.c
+++ b/sbin/isakmpd/ike_auth.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ike_auth.c,v 1.26 2000/06/20 05:55:15 niklas Exp $ */
-/* $EOM: ike_auth.c,v 1.52 2000/06/19 07:41:07 niklas Exp $ */
+/* $OpenBSD: ike_auth.c,v 1.27 2000/08/03 07:23:32 niklas Exp $ */
+/* $EOM: ike_auth.c,v 1.53 2000/07/25 17:15:40 provos Exp $ */
/*
* Copyright (c) 1998, 1999, 2000 Niklas Hallqvist. All rights reserved.
@@ -372,6 +372,10 @@ pre_shared_gen_skeyid (struct exchange *exchange, size_t *sz)
if (buf)
free (buf);
+ /* Fail if no key could be found */
+ if (key == NULL)
+ return 0;
+
/* Store the secret key for later policy processing. */
exchange->recv_cert = malloc (keylen);
if (!exchange->recv_cert)