diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-04-30 13:41:05 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-05-07 16:00:40 +1000 |
commit | 45c236ad1f1c881281017941a0e7126735a190e8 (patch) | |
tree | bc6e710183451c59c4eaeb9c28c57c3a031b9fb7 /providers | |
parent | 3bf26eb335a0b4613fa1dd844afb146ba0b8b959 (diff) |
Add RSA SHA512 truncated digest support
Partial Fix for #11648.
Some additional work still needs to be done to support RSA-PSS mode.
RSA legacy digests will be addressed in another PR.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11681)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/common/der/der_rsa.c.in | 2 | ||||
-rw-r--r-- | providers/implementations/signature/rsa.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/providers/common/der/der_rsa.c.in b/providers/common/der/der_rsa.c.in index cdff722818..bc7c0095e9 100644 --- a/providers/common/der/der_rsa.c.in +++ b/providers/common/der/der_rsa.c.in @@ -62,6 +62,8 @@ int DER_w_algorithmIdentifier_RSA_with(WPACKET *pkt, int tag, MD_CASE(sha256); MD_CASE(sha384); MD_CASE(sha512); + MD_CASE(sha512_224); + MD_CASE(sha512_256); MD_CASE(sha3_224); MD_CASE(sha3_256); MD_CASE(sha3_384); diff --git a/providers/implementations/signature/rsa.c b/providers/implementations/signature/rsa.c index fdcdb56194..0670447480 100644 --- a/providers/implementations/signature/rsa.c +++ b/providers/implementations/signature/rsa.c @@ -129,6 +129,8 @@ static int rsa_get_md_nid(const EVP_MD *md) { NID_sha256, OSSL_DIGEST_NAME_SHA2_256 }, { NID_sha384, OSSL_DIGEST_NAME_SHA2_384 }, { NID_sha512, OSSL_DIGEST_NAME_SHA2_512 }, + { NID_sha512_224, OSSL_DIGEST_NAME_SHA2_512_224 }, + { NID_sha512_256, OSSL_DIGEST_NAME_SHA2_512_256 }, { NID_md5, OSSL_DIGEST_NAME_MD5 }, { NID_md5_sha1, OSSL_DIGEST_NAME_MD5_SHA1 }, { NID_md2, OSSL_DIGEST_NAME_MD2 }, |