diff options
Diffstat (limited to 'crypto/dsa/dsa_ameth.c')
-rw-r--r-- | crypto/dsa/dsa_ameth.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c index aa3f55e218..50273b03f3 100644 --- a/crypto/dsa/dsa_ameth.c +++ b/crypto/dsa/dsa_ameth.c @@ -307,7 +307,7 @@ static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) unsigned char *dp = NULL; int dplen; - if (!pkey->pkey.dsa->priv_key) + if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key) { DSAerr(DSA_F_DSA_PRIV_ENCODE,DSA_R_MISSING_PARAMETERS); goto err; @@ -717,4 +717,3 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[] = old_dsa_priv_encode } }; - |