diff options
author | tb <> | 2022-01-14 08:38:06 +0000 |
---|---|---|
committer | tb <> | 2022-01-14 08:38:06 +0000 |
commit | 2a284011fbab2624ef09302d0c806c76dd42b2c9 (patch) | |
tree | c82726f940ee4796d12475c7295f11404867aae9 /src/lib/libcrypto/evp/m_sm3.c | |
parent | 385790bbe258a0de5b6842a60a07a834e590fe1a (diff) | |
download | openbsd-2a284011fbab2624ef09302d0c806c76dd42b2c9.tar.gz openbsd-2a284011fbab2624ef09302d0c806c76dd42b2c9.tar.bz2 openbsd-2a284011fbab2624ef09302d0c806c76dd42b2c9.zip |
Remove legacy sign/verify from EVP_MD.
This removes m_dss.c, m_dss1.c, and m_ecdsa.c and the corresponding
public API EVP_{dss,dss1,ecdsa}().
This is basically the following OpenSSL commit. The mentioned change in
RSA is already present in rsa/rsa_pmeth.c.
ok inoguchi jsing
commit 7f572e958b13041056f377a62d3219633cfb1e8a
Author: Dr. Stephen Henson <steve@openssl.org>
Date: Wed Dec 2 13:57:04 2015 +0000
Remove legacy sign/verify from EVP_MD.
Remove sign/verify and required_pkey_type fields of EVP_MD: these are a
legacy from when digests were linked to public key types. All signing is
now handled by the corresponding EVP_PKEY_METHOD.
Only allow supported digest types in RSA EVP_PKEY_METHOD: other algorithms
already block unsupported types.
Remove now obsolete EVP_dss1() and EVP_ecdsa().
Reviewed-by: Richard Levitte <levitte@openssl.org>
Plus OpenSSL commit 625a9baf11c1dd94f17e5876b6ee8d6271b3921d for m_dss.c
Diffstat (limited to 'src/lib/libcrypto/evp/m_sm3.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_sm3.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/lib/libcrypto/evp/m_sm3.c b/src/lib/libcrypto/evp/m_sm3.c index 614be5d780..ae8b342e82 100644 --- a/src/lib/libcrypto/evp/m_sm3.c +++ b/src/lib/libcrypto/evp/m_sm3.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: m_sm3.c,v 1.2 2021/12/12 21:30:13 tb Exp $ */ | 1 | /* $OpenBSD: m_sm3.c,v 1.3 2022/01/14 08:38:06 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, Ribose Inc | 3 | * Copyright (c) 2018, Ribose Inc |
4 | * | 4 | * |
@@ -49,19 +49,12 @@ static const EVP_MD sm3_md = { | |||
49 | .type = NID_sm3, | 49 | .type = NID_sm3, |
50 | .pkey_type = NID_sm3WithRSAEncryption, | 50 | .pkey_type = NID_sm3WithRSAEncryption, |
51 | .md_size = SM3_DIGEST_LENGTH, | 51 | .md_size = SM3_DIGEST_LENGTH, |
52 | .flags = EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT, | 52 | .flags = EVP_MD_FLAG_DIGALGID_ABSENT, |
53 | .init = sm3_init, | 53 | .init = sm3_init, |
54 | .update = sm3_update, | 54 | .update = sm3_update, |
55 | .final = sm3_final, | 55 | .final = sm3_final, |
56 | .copy = NULL, | 56 | .copy = NULL, |
57 | .cleanup = NULL, | 57 | .cleanup = NULL, |
58 | #ifndef OPENSSL_NO_RSA | ||
59 | .sign = (evp_sign_method *)RSA_sign, | ||
60 | .verify = (evp_verify_method *)RSA_verify, | ||
61 | .required_pkey_type = { | ||
62 | EVP_PKEY_RSA, EVP_PKEY_RSA2, 0, 0, | ||
63 | }, | ||
64 | #endif | ||
65 | .block_size = SM3_CBLOCK, | 58 | .block_size = SM3_CBLOCK, |
66 | .ctx_size = sizeof(EVP_MD *) + sizeof(SM3_CTX), | 59 | .ctx_size = sizeof(EVP_MD *) + sizeof(SM3_CTX), |
67 | }; | 60 | }; |