diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-08-29 18:03:17 +1000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-09-18 14:20:39 +0100 |
commit | 49ed5ba8f62875074f04417189147fd3dda072ab (patch) | |
tree | ec3fb443c1027ec8ffbb98f5138eade6c31e86c0 /providers/common | |
parent | 16fbda848d9fa3a2ca31bc168680f246a8edcc95 (diff) |
fix provider signatures
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12745)
Diffstat (limited to 'providers/common')
-rw-r--r-- | providers/common/check_fips.c | 3 | ||||
-rw-r--r-- | providers/common/digest_to_nid.c | 15 |
2 files changed, 7 insertions, 11 deletions
diff --git a/providers/common/check_fips.c b/providers/common/check_fips.c index 1ce0718e1d..891df497c3 100644 --- a/providers/common/check_fips.c +++ b/providers/common/check_fips.c @@ -22,7 +22,8 @@ /* * FIPS requires a minimum security strength of 112 bits (for encryption or * signing), and for legacy purposes 80 bits (for decryption or verifying). - * Set protect = 1 for encryption or signing operations, or 0 otherwise. + * Set protect = 1 for encryption or signing operations, or 0 otherwise. See + * https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf. */ int rsa_check_key(const RSA *rsa, int protect) { diff --git a/providers/common/digest_to_nid.c b/providers/common/digest_to_nid.c index 4f59709f5d..e233ce4251 100644 --- a/providers/common/digest_to_nid.c +++ b/providers/common/digest_to_nid.c @@ -21,19 +21,14 @@ int digest_md_to_nid(const EVP_MD *md, const OSSL_ITEM *it, size_t it_len) { size_t i; - int mdnid = NID_undef; if (md == NULL) - goto end; + return NID_undef; - for (i = 0; i < it_len; i++) { - if (EVP_MD_is_a(md, it[i].ptr)) { - mdnid = (int)it[i].id; - break; - } - } - end: - return mdnid; + for (i = 0; i < it_len; i++) + if (EVP_MD_is_a(md, it[i].ptr)) + return (int)it[i].id; + return NID_undef; } /* |