summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2024-01-27 16:08:43 +0000
committertb <>2024-01-27 16:08:43 +0000
commitfa5808c10d4148106c5352199c21acab20f0490c (patch)
treee1f279d930d9249200d60e41f3b36eec5072dc55
parent69d87155282866a8ffaeb4c64c869383a6f8c3fb (diff)
downloadopenbsd-fa5808c10d4148106c5352199c21acab20f0490c.tar.gz
openbsd-fa5808c10d4148106c5352199c21acab20f0490c.tar.bz2
openbsd-fa5808c10d4148106c5352199c21acab20f0490c.zip
Teach OBJ_find_sigid_{,by_}algs(3) about ECDSA with SHA-3
This allows signing and verifying ASN.1 "items" using the ECDSA with SHA-3 signature algorithms. With this diff, ECDSA certificates and CMS products using ECDSA with SHA-3 can be generated using the openssl command line tool. ok jsing
-rw-r--r--src/lib/libcrypto/objects/obj_xref.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/libcrypto/objects/obj_xref.c b/src/lib/libcrypto/objects/obj_xref.c
index 0fca228ed8..321c2f50b6 100644
--- a/src/lib/libcrypto/objects/obj_xref.c
+++ b/src/lib/libcrypto/objects/obj_xref.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: obj_xref.c,v 1.13 2023/07/28 10:25:05 tb Exp $ */ 1/* $OpenBSD: obj_xref.c,v 1.14 2024/01/27 16:08:43 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
@@ -265,6 +265,26 @@ static const struct {
265 .hash_nid = NID_sha3_512, 265 .hash_nid = NID_sha3_512,
266 .pkey_nid = NID_rsaEncryption, 266 .pkey_nid = NID_rsaEncryption,
267 }, 267 },
268 {
269 .sign_nid = NID_ecdsa_with_SHA3_224,
270 .hash_nid = NID_sha3_224,
271 .pkey_nid = NID_X9_62_id_ecPublicKey,
272 },
273 {
274 .sign_nid = NID_ecdsa_with_SHA3_256,
275 .hash_nid = NID_sha3_256,
276 .pkey_nid = NID_X9_62_id_ecPublicKey,
277 },
278 {
279 .sign_nid = NID_ecdsa_with_SHA3_384,
280 .hash_nid = NID_sha3_384,
281 .pkey_nid = NID_X9_62_id_ecPublicKey,
282 },
283 {
284 .sign_nid = NID_ecdsa_with_SHA3_512,
285 .hash_nid = NID_sha3_512,
286 .pkey_nid = NID_X9_62_id_ecPublicKey,
287 },
268}; 288};
269 289
270#define N_NID_TRIPLES (sizeof(nid_triple) / sizeof(nid_triple[0])) 290#define N_NID_TRIPLES (sizeof(nid_triple) / sizeof(nid_triple[0]))