diff options
author | Tobias Brunner <tobias@strongswan.org> | 2010-03-12 17:27:05 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2010-03-12 17:28:20 +0100 |
commit | 01b87c2bc195e37b49cd825084c4223b4f44bb3f (patch) | |
tree | 6ca8b9753d00c93f13d5f5f52fe450a634ee8491 | |
parent | 4cedab5ad7abd3778a2a86f12ecc65b13251bb88 (diff) | |
download | strongswan-01b87c2bc195e37b49cd825084c4223b4f44bb3f.tar.bz2 strongswan-01b87c2bc195e37b49cd825084c4223b4f44bb3f.tar.xz |
Fixed a bug in pluto's x509 handling.
This bug would have lead to a segmentation fault, if no public key could
have been extracted from a certificate.
-rw-r--r-- | src/pluto/x509.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pluto/x509.c b/src/pluto/x509.c index d8e887955..0a29830ea 100644 --- a/src/pluto/x509.c +++ b/src/pluto/x509.c @@ -419,11 +419,11 @@ void list_x509cert_chain(const char *caption, cert_t* cert, check_expiry(notAfter, CA_CERT_WARNING_INTERVAL, TRUE)); key = certificate->get_public_key(certificate); - if (key); + if (key) { whack_log(RC_COMMENT, " pubkey: %N %4d bits%s", key_type_names, key->get_type(key), - key->get_keysize(key) * BITS_PER_BYTE, + key->get_keysize(key) * BITS_PER_BYTE, cert->smartcard ? ", on smartcard" : (has_private_key(cert)? ", has private key" : "")); |