diff options
author | Patrick Steuer <patrick.steuer@de.ibm.com> | 2019-05-21 17:43:54 +0200 |
---|---|---|
committer | Patrick Steuer <patrick.steuer@de.ibm.com> | 2019-05-22 17:07:04 +0200 |
commit | bf3797fe3b71d58791b20cf6bc2304284e7aaa85 (patch) | |
tree | ff6118a972f59c548c568989362a7f3436ea701b /crypto | |
parent | 2341db5ca10fa3dc1f04d739bd4614e9b3e4e386 (diff) |
EVP_Digest*: enable SHA3 pre-hashing for ECDSA
Fixes #8957
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8970)
(cherry picked from commit e8d0678da4942dd027981175b16b6b3162731205)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ec/ec_pmeth.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index f4ad0749ef..ffaa2f8edf 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -323,7 +323,11 @@ static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) EVP_MD_type((const EVP_MD *)p2) != NID_sha224 && EVP_MD_type((const EVP_MD *)p2) != NID_sha256 && EVP_MD_type((const EVP_MD *)p2) != NID_sha384 && - EVP_MD_type((const EVP_MD *)p2) != NID_sha512) { + EVP_MD_type((const EVP_MD *)p2) != NID_sha512 && + EVP_MD_type((const EVP_MD *)p2) != NID_sha3_224 && + EVP_MD_type((const EVP_MD *)p2) != NID_sha3_256 && + EVP_MD_type((const EVP_MD *)p2) != NID_sha3_384 && + EVP_MD_type((const EVP_MD *)p2) != NID_sha3_512) { ECerr(EC_F_PKEY_EC_CTRL, EC_R_INVALID_DIGEST_TYPE); return 0; } |