From 23577b2e8653b0edbea6a288e7c3008d36e2c6a1 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Tue, 5 Aug 2025 16:13:24 +0200 Subject: [PATCH] Add 'private_key_bits' option to EC key generation Documented the addition of the 'private_key_bits' option with a comment clarifying its non-standard usage for EC keys. --- src/Library/Core/Util/ECKey.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Library/Core/Util/ECKey.php b/src/Library/Core/Util/ECKey.php index 76b45189..6c3bc696 100644 --- a/src/Library/Core/Util/ECKey.php +++ b/src/Library/Core/Util/ECKey.php @@ -92,6 +92,7 @@ private static function createECKeyUsingOpenSSL(string $curve): array $key = openssl_pkey_new([ 'curve_name' => self::getOpensslCurveName($curve), 'private_key_type' => OPENSSL_KEYTYPE_EC, + 'private_key_bits' => 2048, // Not used for EC keys. See https://github.com/php/php-src/pull/19103 ]); if ($key === false) { throw new RuntimeException('Unable to create the key');