aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2008-05-23 19:22:37 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2008-05-23 19:22:37 +0000
commit49b2395e3b549b55a2e15612cf1d7f4e5c0c8c22 (patch)
treefc6c8ec5f921a9c6a5654a6ef6774667e264d9cd /src
parent7dfb8a1bdeecd7fe6d3db031fb859a65bedcb19f (diff)
downloadstrongswan-49b2395e3b549b55a2e15612cf1d7f4e5c0c8c22.tar.bz2
strongswan-49b2395e3b549b55a2e15612cf1d7f4e5c0c8c22.tar.xz
check if parsing of the RSA public key in an X.509 certificate was successful
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/plugins/x509/x509_cert.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/x509/x509_cert.c b/src/libstrongswan/plugins/x509/x509_cert.c
index ff176b710..a562f8b5a 100644
--- a/src/libstrongswan/plugins/x509/x509_cert.c
+++ b/src/libstrongswan/plugins/x509/x509_cert.c
@@ -740,6 +740,11 @@ static bool parse_certificate(private_x509_cert_t *this)
CRED_PUBLIC_KEY, KEY_RSA,
BUILD_BLOB_ASN1_DER, chunk_clone(object),
BUILD_END);
+ if (this->public_key == NULL)
+ {
+ DBG1("could not create RSA public key");
+ goto end;
+ }
break;
default:
DBG1("parsing key type %d failed", key_alg);