summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_pmeth.c
diff options
context:
space:
mode:
authortb <>2023-04-25 15:48:48 +0000
committertb <>2023-04-25 15:48:48 +0000
commitaa06ff6ff84baafcac76b48d7a0dcd4f9d00d7d2 (patch)
tree8fc6489b768abe5eb7eafc75ed8631756451a226 /src/lib/libcrypto/rsa/rsa_pmeth.c
parent9670fcb7ce8b0f516e7924baa6167b992630dc77 (diff)
downloadopenbsd-aa06ff6ff84baafcac76b48d7a0dcd4f9d00d7d2.tar.gz
openbsd-aa06ff6ff84baafcac76b48d7a0dcd4f9d00d7d2.tar.bz2
openbsd-aa06ff6ff84baafcac76b48d7a0dcd4f9d00d7d2.zip
Wire up truncated SHA-2, SHA-3 and related things
from jsing
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_pmeth.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_pmeth.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_pmeth.c b/src/lib/libcrypto/rsa/rsa_pmeth.c
index 688c0d64db..8e06365566 100644
--- a/src/lib/libcrypto/rsa/rsa_pmeth.c
+++ b/src/lib/libcrypto/rsa/rsa_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_pmeth.c,v 1.36 2023/04/15 18:48:52 tb Exp $ */ 1/* $OpenBSD: rsa_pmeth.c,v 1.37 2023/04/25 15:48:48 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -371,12 +371,19 @@ check_padding_md(const EVP_MD *md, int padding)
371 } 371 }
372 372
373 /* List of all supported RSA digests. */ 373 /* List of all supported RSA digests. */
374 /* RFC 8017 and NIST CSOR. */
374 switch(EVP_MD_type(md)) { 375 switch(EVP_MD_type(md)) {
375 case NID_sha1: 376 case NID_sha1:
376 case NID_sha224: 377 case NID_sha224:
377 case NID_sha256: 378 case NID_sha256:
378 case NID_sha384: 379 case NID_sha384:
379 case NID_sha512: 380 case NID_sha512:
381 case NID_sha512_224:
382 case NID_sha512_256:
383 case NID_sha3_224:
384 case NID_sha3_256:
385 case NID_sha3_384:
386 case NID_sha3_512:
380 case NID_md5: 387 case NID_md5:
381 case NID_md5_sha1: 388 case NID_md5_sha1:
382 case NID_md4: 389 case NID_md4: