Skip to content

Commit 0c9fbdd

Browse files
committed
fixup! crypto: support SLH-DSA KeyObject, sign, and verify
1 parent 4ed297b commit 0c9fbdd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

deps/ncrypto/ncrypto.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,12 @@ int EVPKeyPointer::id(const EVP_PKEY* key) {
19971997
if (key == nullptr) return 0;
19981998
int type = EVP_PKEY_id(key);
19991999
#if OPENSSL_WITH_PQC
2000+
// EVP_PKEY_id returns -1 when EVP_PKEY_* is only implemented in a provider
2001+
// which is the case for all post-quantum NIST algorithms
2002+
// one suggested way would be to use a chain of `EVP_PKEY_is_a`
20002003
// https://github.com/openssl/openssl/issues/27738#issuecomment-3013215870
2004+
// or, this way there are less calls to the OpenSSL provider, just
2005+
// getting the name once
20012006
if (type == -1) {
20022007
const char* type_name = EVP_PKEY_get0_type_name(key);
20032008
if (type_name == nullptr) return -1;

0 commit comments

Comments
 (0)