check if parsing of the RSA public key in an X.509 certificate was successful

This commit is contained in:
Andreas Steffen
2008-05-23 19:22:37 +00:00
parent 7dfb8a1bde
commit 49b2395e3b
@@ -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);