summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa
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/dsa
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/dsa')
-rw-r--r--src/lib/libcrypto/dsa/dsa_pmeth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_pmeth.c b/src/lib/libcrypto/dsa/dsa_pmeth.c
index 66f4ddbe38..9b03a2fc3a 100644
--- a/src/lib/libcrypto/dsa/dsa_pmeth.c
+++ b/src/lib/libcrypto/dsa/dsa_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_pmeth.c,v 1.16 2022/11/26 16:08:52 tb Exp $ */ 1/* $OpenBSD: dsa_pmeth.c,v 1.17 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 */
@@ -203,6 +203,7 @@ pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
203 return 1; 203 return 1;
204 204
205 case EVP_PKEY_CTRL_MD: 205 case EVP_PKEY_CTRL_MD:
206 /* ANSI X9.57 and NIST CSOR. */
206 switch (EVP_MD_type((const EVP_MD *)p2)) { 207 switch (EVP_MD_type((const EVP_MD *)p2)) {
207 case NID_sha1: 208 case NID_sha1:
208 case NID_dsa: 209 case NID_dsa:
@@ -211,6 +212,10 @@ pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
211 case NID_sha256: 212 case NID_sha256:
212 case NID_sha384: 213 case NID_sha384:
213 case NID_sha512: 214 case NID_sha512:
215 case NID_sha3_224:
216 case NID_sha3_256:
217 case NID_sha3_384:
218 case NID_sha3_512:
214 break; 219 break;
215 default: 220 default:
216 DSAerror(DSA_R_INVALID_DIGEST_TYPE); 221 DSAerror(DSA_R_INVALID_DIGEST_TYPE);