diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-05-27 14:18:40 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-05-31 13:06:16 +0100 |
commit | f72f00d49549c6620d7101f5e9bf7963da6df9ee (patch) | |
tree | 81a4405a40070cff6a861591fd4a287147d0d6aa /crypto/dsa | |
parent | cc7113e8def99702ed59594e9eb7fea0bd1db518 (diff) | |
download | openssl-f72f00d49549c6620d7101f5e9bf7963da6df9ee.tar.gz |
Parameter copy sanity checks.
Don't copy parameters is they're already present in the destination.
Return error if an attempt is made to copy different parameters to
destination. Update documentation.
If key type is not initialised return missing parameters
RT#4149
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_ameth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c index 1bb11a9ed5..a53247c074 100644 --- a/crypto/dsa/dsa_ameth.c +++ b/crypto/dsa/dsa_ameth.c @@ -266,7 +266,7 @@ static int dsa_missing_parameters(const EVP_PKEY *pkey) { DSA *dsa; dsa = pkey->pkey.dsa; - if ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL)) + if (dsa == NULL || dsa->p == NULL || dsa->q == NULL || dsa->g == NULL) return 1; return 0; } |