diff options
author | David Woodhouse <dwmw2@infradead.org> | 2018-10-16 07:41:17 -0700 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2018-11-24 09:00:25 +0200 |
commit | cf68eb3687e271d02e55af2c132ea7527d76bcac (patch) | |
tree | 3f9c73b9102f7d4e4fb00fa92e72390c0ca211e7 | |
parent | 23bfb5b556a4e534fd61fb30719851d4b7b1fc82 (diff) |
Stop marking default digest for EC keys as mandatory
ASN1_PKEY_CTRL_DEFAULT_MD_NID is documented to return 2 for a mandatory
digest algorithm, when the key can't support any others. That isn't true
here, so return 1 instead.
Partially fixes #7348
(cherry picked from commit eb7eb1378cd15c4652884b3701d4c0ef27b5b8a6)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/7610)
-rw-r--r-- | crypto/ec/ec_ameth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c index aa5f3056af..db7e791bf5 100644 --- a/crypto/ec/ec_ameth.c +++ b/crypto/ec/ec_ameth.c @@ -601,7 +601,7 @@ static int ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) case ASN1_PKEY_CTRL_DEFAULT_MD_NID: *(int *)arg2 = NID_sha256; - return 2; + return 1; default: return -2; |