File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments