1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Files
archived-php-src/ext/openssl/tests/bug80747.phpt
T
Niels Dossche 974dba3b80 Fix duplicated FILE section in test bug80747.phpt
Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-23 13:50:49 +00:00

23 lines
448 B
PHP

--TEST--
Bug #80747: Providing RSA key size < 512 generates key that crash PHP
--EXTENSIONS--
openssl
--SKIPIF--
<?php
if (OPENSSL_VERSION_NUMBER < 0x10100000) die("skip OpenSSL >= v1.1.0 required");
?>
--FILE--
<?php
$conf = array(
'config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf',
'private_key_bits' => 511,
);
var_dump(openssl_pkey_new($conf));
var_dump(openssl_error_string() !== false);
?>
--EXPECT--
bool(false)
bool(true)