We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ed297b commit 0c9fbddCopy full SHA for 0c9fbdd
deps/ncrypto/ncrypto.cc
@@ -1997,7 +1997,12 @@ int EVPKeyPointer::id(const EVP_PKEY* key) {
1997
if (key == nullptr) return 0;
1998
int type = EVP_PKEY_id(key);
1999
#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`
2003
// 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
2006
if (type == -1) {
2007
const char* type_name = EVP_PKEY_get0_type_name(key);
2008
if (type_name == nullptr) return -1;
0 commit comments