Closed
Description
Description
Looking at openssl.c:
-
HAVE_EVP_PKEY_EC
is defined only ifOPENSSL_NO_EC
is defined:
https://github.com/php/php-src/blob/php-8.1.8/ext/openssl/openssl.c#L89#if !defined(OPENSSL_NO_EC) && defined(EVP_PKEY_EC) #define HAVE_EVP_PKEY_EC 1 #endif
-
OPENSSL_KEYTYPE_EC
is defined only ifHAVE_EVP_PKEY_EC
is defined:
https://github.com/php/php-src/blob/php-8.1.8/ext/openssl/openssl.c#L107#ifdef HAVE_EVP_PKEY_EC OPENSSL_KEYTYPE_EC = OPENSSL_KEYTYPE_DH +1 #endif
-
but then on line 4899 it is used without proper
#ifdef
's:
https://github.com/php/php-src/blob/php-8.1.8/ext/openssl/openssl.c#L4898case EVP_PKEY_EC: { ktype = OPENSSL_KEYTYPE_EC;
Worth noting that further down it's properly #ifdef
'd out:
https://github.com/php/php-src/blob/php-8.1.8/ext/openssl/openssl.c#L5003
#ifdef HAVE_EVP_PKEY_EC
case EVP_PKEY_EC:
ktype = OPENSSL_KEYTYPE_EC;
Probably it should be #ifdef
'd on line 4899, too?
PHP Version
8.1.8
Operating System
No response