Implement SupportsSignatureRSAPKCS1 #234
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have historically used
openssl.SupportsHash
as a proxy to know if signing and verifying with RSA PCKS1 would support a given hash function, butopenssl.SupportsHash
is meant to be used to know if a given hash is supported byEVP_MD_CTX
.Some providers (such as SCOSSL) don't implement RSA PCKS1 signing using
EVP_MD_CTX
, they may support more (or less) hash objects in aEVP_PKEY_CTX
than they do inEVP_MD_CTX
. Given this discordance, we should provide a dedicated function to prove whether a given hash function is supported by RSA PCKS1.While here, add some more supported hash functions to the
cryptoHashToMD
function so that RSA PCKS1 signing and verifying can potentially support the same algorithms as upstream does.