diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2006-11-09 09:43:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2006-11-09 09:43:36 +0000 |
commit | e2d74357315ab10544ddc96eae69cbc646c08119 (patch) | |
tree | d96fb518b48f57afb8e6d598db8420d73eee1ff0 /sbin/isakmpd | |
parent | 6f06abf798f653566828cfc74cd32dbb07d50454 (diff) |
support public keys w/o SubjectPublicKeyInfo (format: BEGIN RSA PUBLIC KEY)
ok ho, hshoexer
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/ike_auth.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/isakmpd/ike_auth.c b/sbin/isakmpd/ike_auth.c index 2de26d45f7d..7d017da260e 100644 --- a/sbin/isakmpd/ike_auth.c +++ b/sbin/isakmpd/ike_auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ike_auth.c,v 1.107 2006/06/10 21:09:45 msf Exp $ */ +/* $OpenBSD: ike_auth.c,v 1.108 2006/11/09 09:43:35 markus Exp $ */ /* $EOM: ike_auth.c,v 1.59 2000/11/21 00:21:31 angelos Exp $ */ /* @@ -1146,6 +1146,10 @@ 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) { + rewind(keyfp); + *rsa = PEM_read_RSAPublicKey(keyfp, NULL, NULL, NULL); + } if (!*rsa) log_print("get_raw_key_from_file: failed to get " "public key %s", filename); |