aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2017-12-07 17:37:15 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2017-12-07 17:37:15 +0000
commit4f94f84d8491a2455678402b5c7c92e692a272bc (patch)
treea4aa27b5b96b57155a4e7c22defb8f25e93cb846 /crypto/dsa
parentb6a9311a3edd056eaacbcbae2fcb723df5d99057 (diff)
downloadsrc-4f94f84d8491a2455678402b5c7c92e692a272bc.tar.gz
src-4f94f84d8491a2455678402b5c7c92e692a272bc.zip
Import OpenSSL 1.0.2n.vendor/openssl/1.0.2n
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=326660 svn path=/vendor-crypto/openssl/1.0.2n/; revision=326661; tag=vendor/openssl/1.0.2n
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_ameth.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c
index aac253095141..e22627f85152 100644
--- a/crypto/dsa/dsa_ameth.c
+++ b/crypto/dsa/dsa_ameth.c
@@ -133,6 +133,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
unsigned char *penc = NULL;
int penclen;
ASN1_STRING *str = NULL;
+ ASN1_OBJECT *aobj;
dsa = pkey->pkey.dsa;
if (pkey->save_parameters && dsa->p && dsa->q && dsa->g) {
@@ -159,8 +160,11 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
goto err;
}
- if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(EVP_PKEY_DSA),
- ptype, str, penc, penclen))
+ aobj = OBJ_nid2obj(EVP_PKEY_DSA);
+ if (aobj == NULL)
+ goto err;
+
+ if (X509_PUBKEY_set0_param(pk, aobj, ptype, str, penc, penclen))
return 1;
err: