diff options
| author | tb <> | 2022-01-14 08:38:06 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-14 08:38:06 +0000 |
| commit | d5bd2d64a9d8dacaf683f88f953d25c96a7009ff (patch) | |
| tree | c82726f940ee4796d12475c7295f11404867aae9 /src/lib/libcrypto/evp/evp.h | |
| parent | 0264d15b2db8e92add54fc0b024d5430c53683d3 (diff) | |
| download | openbsd-d5bd2d64a9d8dacaf683f88f953d25c96a7009ff.tar.gz openbsd-d5bd2d64a9d8dacaf683f88f953d25c96a7009ff.tar.bz2 openbsd-d5bd2d64a9d8dacaf683f88f953d25c96a7009ff.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/evp.h')
| -rw-r--r-- | src/lib/libcrypto/evp/evp.h | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index acf0650f9a..a80cf189fc 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp.h,v 1.98 2022/01/14 08:04:14 tb Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.99 2022/01/14 08:38:05 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -128,15 +128,6 @@ extern "C" { | |||
| 128 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single | 128 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single |
| 129 | * block */ | 129 | * block */ |
| 130 | 130 | ||
| 131 | #define EVP_MD_FLAG_PKEY_DIGEST 0x0002 /* digest is a "clone" digest used | ||
| 132 | * which is a copy of an existing | ||
| 133 | * one for a specific public key type. | ||
| 134 | * EVP_dss1() etc */ | ||
| 135 | |||
| 136 | /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */ | ||
| 137 | |||
| 138 | #define EVP_MD_FLAG_PKEY_METHOD_SIGNATURE 0x0004 | ||
| 139 | |||
| 140 | /* DigestAlgorithmIdentifier flags... */ | 131 | /* DigestAlgorithmIdentifier flags... */ |
| 141 | 132 | ||
| 142 | #define EVP_MD_FLAG_DIGALGID_MASK 0x0018 | 133 | #define EVP_MD_FLAG_DIGALGID_MASK 0x0018 |
| @@ -166,38 +157,6 @@ extern "C" { | |||
| 166 | 157 | ||
| 167 | #define EVP_MD_CTRL_ALG_CTRL 0x1000 | 158 | #define EVP_MD_CTRL_ALG_CTRL 0x1000 |
| 168 | 159 | ||
| 169 | #define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} | ||
| 170 | |||
| 171 | #ifndef OPENSSL_NO_DSA | ||
| 172 | #define EVP_PKEY_DSA_method (evp_sign_method *)DSA_sign, \ | ||
| 173 | (evp_verify_method *)DSA_verify, \ | ||
| 174 | {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \ | ||
| 175 | EVP_PKEY_DSA4,0} | ||
| 176 | #else | ||
| 177 | #define EVP_PKEY_DSA_method EVP_PKEY_NULL_method | ||
| 178 | #endif | ||
| 179 | |||
| 180 | #ifndef OPENSSL_NO_ECDSA | ||
| 181 | #define EVP_PKEY_ECDSA_method (evp_sign_method *)ECDSA_sign, \ | ||
| 182 | (evp_verify_method *)ECDSA_verify, \ | ||
| 183 | {EVP_PKEY_EC,0,0,0} | ||
| 184 | #else | ||
| 185 | #define EVP_PKEY_ECDSA_method EVP_PKEY_NULL_method | ||
| 186 | #endif | ||
| 187 | |||
| 188 | #ifndef OPENSSL_NO_RSA | ||
| 189 | #define EVP_PKEY_RSA_method (evp_sign_method *)RSA_sign, \ | ||
| 190 | (evp_verify_method *)RSA_verify, \ | ||
| 191 | {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} | ||
| 192 | #define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \ | ||
| 193 | (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, \ | ||
| 194 | (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, \ | ||
| 195 | {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} | ||
| 196 | #else | ||
| 197 | #define EVP_PKEY_RSA_method EVP_PKEY_NULL_method | ||
| 198 | #define EVP_PKEY_RSA_ASN1_OCTET_STRING_method EVP_PKEY_NULL_method | ||
| 199 | #endif | ||
| 200 | |||
| 201 | #endif /* !EVP_MD */ | 160 | #endif /* !EVP_MD */ |
| 202 | 161 | ||
| 203 | /* values for EVP_MD_CTX flags */ | 162 | /* values for EVP_MD_CTX flags */ |
| @@ -598,9 +557,6 @@ const EVP_MD *EVP_md5_sha1(void); | |||
| 598 | #endif | 557 | #endif |
| 599 | #ifndef OPENSSL_NO_SHA | 558 | #ifndef OPENSSL_NO_SHA |
| 600 | const EVP_MD *EVP_sha1(void); | 559 | const EVP_MD *EVP_sha1(void); |
| 601 | const EVP_MD *EVP_dss(void); | ||
| 602 | const EVP_MD *EVP_dss1(void); | ||
| 603 | const EVP_MD *EVP_ecdsa(void); | ||
| 604 | #endif | 560 | #endif |
| 605 | #ifndef OPENSSL_NO_SHA256 | 561 | #ifndef OPENSSL_NO_SHA256 |
| 606 | const EVP_MD *EVP_sha224(void); | 562 | const EVP_MD *EVP_sha224(void); |
