diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2016-09-22 13:27:44 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2016-09-22 13:27:44 +0000 |
commit | aeb5019c481d34f2422c200e4751e24ec940fe3f (patch) | |
tree | 58485f1ec6fba896abc86fe8ebcb991930ec881f /crypto/openssl/apps/x509.c | |
parent | d29c55519589bbc7c6b2e52b787f4cb6226e54a0 (diff) | |
parent | e1b483878d9824c63d376895da633b0b96fbbaed (diff) | |
download | src-aeb5019c481d34f2422c200e4751e24ec940fe3f.tar.gz src-aeb5019c481d34f2422c200e4751e24ec940fe3f.zip |
Notes
Diffstat (limited to 'crypto/openssl/apps/x509.c')
-rw-r--r-- | crypto/openssl/apps/x509.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/openssl/apps/x509.c b/crypto/openssl/apps/x509.c index 7c215bced001..17cb62da726d 100644 --- a/crypto/openssl/apps/x509.c +++ b/crypto/openssl/apps/x509.c @@ -1105,6 +1105,10 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest, EVP_PKEY *upkey; upkey = X509_get_pubkey(xca); + if (upkey == NULL) { + BIO_printf(bio_err, "Error obtaining CA X509 public key\n"); + goto end; + } EVP_PKEY_copy_parameters(upkey, pkey); EVP_PKEY_free(upkey); @@ -1217,6 +1221,8 @@ static int sign(X509 *x, EVP_PKEY *pkey, int days, int clrext, EVP_PKEY *pktmp; pktmp = X509_get_pubkey(x); + if (pktmp == NULL) + goto err; EVP_PKEY_copy_parameters(pktmp, pkey); EVP_PKEY_save_parameters(pktmp, 1); EVP_PKEY_free(pktmp); |