Skip to content

Commit 5b999c5

Browse files
committed
Add 'private_key_bits' option to EC key generation (#630)
Documented the addition of the 'private_key_bits' option with a comment clarifying its non-standard usage for EC keys.
1 parent c396520 commit 5b999c5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Library/Core/Util/ECKey.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ private static function createECKeyUsingOpenSSL(string $curve): array
9292
$key = openssl_pkey_new([
9393
'curve_name' => self::getOpensslCurveName($curve),
9494
'private_key_type' => OPENSSL_KEYTYPE_EC,
95+
'private_key_bits' => 2048, // Not used for EC keys. See https://github.com/php/php-src/pull/19103
9596
]);
9697
if ($key === false) {
9798
throw new RuntimeException('Unable to create the key');

0 commit comments

Comments
 (0)