summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-02-22 16:57:49 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-02-22 16:57:49 +0000
commit633223bff33dd7b81edcf29f905c3c88a662eb10 (patch)
tree9d3cb942bd85cdbd7c71791a7d397697ebf6bbc6
parent97a035aa4680596580d552e471dcd1955a00f183 (diff)
better error messages
ok ho
-rw-r--r--sbin/isakmpd/ike_auth.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/isakmpd/ike_auth.c b/sbin/isakmpd/ike_auth.c
index ea9259c7760..494ca5f0092 100644
--- a/sbin/isakmpd/ike_auth.c
+++ b/sbin/isakmpd/ike_auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike_auth.c,v 1.96 2004/12/22 12:25:27 hshoexer Exp $ */
+/* $OpenBSD: ike_auth.c,v 1.97 2005/02/22 16:57:48 hshoexer Exp $ */
/* $EOM: ike_auth.c,v 1.59 2000/11/21 00:21:31 angelos Exp $ */
/*
@@ -167,7 +167,7 @@ ike_auth_get_key(int type, char *id, char *local_id, size_t *keylen)
if (!key) {
log_print("ike_auth_get_key: "
"no key found for peer \"%s\" or local ID \"%s\"",
- id, local_id);
+ id, local_id ? local_id : "<none>");
return 0;
}
/* If the key starts with 0x it is in hex format. */
@@ -1153,6 +1153,9 @@ get_raw_key_from_file(int type, u_int8_t *id, size_t id_len, RSA **rsa)
keyfp = monitor_fopen(filename, "r");
if (keyfp) {
*rsa = PEM_read_RSA_PUBKEY(keyfp, NULL, NULL, NULL);
+ if (!*rsa)
+ log_print("get_raw_key_from_file: failed to get "
+ "public key %s", filename);
fclose(keyfp);
} else if (errno != ENOENT) {
log_error("get_raw_key_from_file: monitor_fopen "