summaryrefslogtreecommitdiff
path: root/sbin/iked/ca.c
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-03-24 19:14:54 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-03-24 19:14:54 +0000
commitb0f7f5a052a59e8c6ef333ce9b8216e988597bb6 (patch)
tree3bba58398c4671ded3c7084ffcc4f82fd6b5b3b3 /sbin/iked/ca.c
parent20b0adcae84dfbe01ef18dd51eb218b7b88630c7 (diff)
Add ikev2_print_static_id() to print static IDs in log_debug() output.
ok markus@
Diffstat (limited to 'sbin/iked/ca.c')
-rw-r--r--sbin/iked/ca.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c
index 2c5c36f37bd..0f3aed1f480 100644
--- a/sbin/iked/ca.c
+++ b/sbin/iked/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.51 2020/03/24 19:11:46 tobhe Exp $ */
+/* $OpenBSD: ca.c,v 1.52 2020/03/24 19:14:53 tobhe Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -444,6 +444,7 @@ ca_getreq(struct iked *env, struct imsg *imsg)
X509 *ca = NULL, *cert = NULL;
struct ibuf *buf;
struct iked_static_id id;
+ char idstr[IKED_ID_SIZE];
ptr = (uint8_t *)imsg->data;
len = IMSG_DATA_SIZE(imsg);
@@ -503,8 +504,10 @@ ca_getreq(struct iked *env, struct imsg *imsg)
/* If there is no matching certificate use local raw pubkey */
if (cert == NULL) {
- log_debug("%s: no valid local certificate found",
- SPI_SH(&sh, __func__));
+ if (ikev2_print_static_id(&id, idstr, sizeof(idstr)) == -1)
+ return (-1);
+ log_debug("%s: no valid local certificate found for %s",
+ SPI_SH(&sh, __func__), idstr);
if (store->ca_pubkey.id_buf == NULL)
return (-1);
buf = ibuf_dup(store->ca_pubkey.id_buf);