[php-src] Issue #21355: Windows builds don't support OPENSSL_KEYTYPE_X25519, OPENSSL_KEYTYPE_ED25519, OPENSSL_KEYTYPE_DSA, etc

From: Date: Fri, 06 Mar 2026 11:37:29 +0000
Subject: [php-src] Issue #21355: Windows builds don't support OPENSSL_KEYTYPE_X25519, OPENSSL_KEYTYPE_ED25519, OPENSSL_KEYTYPE_DSA, etc
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251756@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/21355 Author: terrafrost ### Description The following code: ```php echo OPENSSL_KEYTYPE_X25519, PHP_EOL, OPENSSL_VERSION_TEXT, PHP_EOL; $key = openssl_pkey_new(['private_key_type' => OPENSSL_KEYTYPE_X25519]); var_dump($key); while ($e = openssl_error_string()) { echo $e, PHP_EOL; } ``` Resulted in this output: ``` 4 OpenSSL 3.5.4 30 Sep 2025 bool(false) error:80000003:system library::No such process error:10000080:BIO routines::no such file error:07000072:configuration file routines::no such file error:80000003:system library::No such process error:10000080:BIO routines::no such file error:07000072:configuration file routines::no such file ``` But I expected this output instead: ``` OpenSSL 3.0.13 30 Jan 2024 object(OpenSSLAsymmetricKey)#1 (0) { } ``` Because the Windows PHP builds include their own version of OpenSSL (usually the latest one as OPENSSL_VERSION_TEXT kinda indicates) as opposed to relying on whatever the globally installed version on the OS is, I'd expect them to have full support for _all_ key types mentioned at https://www.php.net/manual/en/openssl.key-types.php but that appears not to be the case. ### PHP Version ```plain PHP 8.5.1 (cli) (built: Dec 17 2025 10:54:30) (NTS Visual C++ 2022 x64) Copyright (c) The PHP Group Zend Engine v4.5.1, Copyright (c) Zend Technologies with Zend OPcache v8.5.1, Copyright (c), by Zend Technologies ``` ### Operating System Windows 11, Version 25H2 (OS Build 26200.7840)

« previous php.bugs (#251756) next »