summaryrefslogtreecommitdiff
path: root/ext/openssl/tests/bug80747.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/tests/bug80747.phpt')
-rw-r--r--ext/openssl/tests/bug80747.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/openssl/tests/bug80747.phpt b/ext/openssl/tests/bug80747.phpt
new file mode 100644
index 0000000000..db83d0266f
--- /dev/null
+++ b/ext/openssl/tests/bug80747.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #80747: Providing RSA key size < 512 generates key that crash PHP
+--FILE--
+--SKIPIF--
+<?php
+if (!extension_loaded("openssl")) die("skip");
+?>
+--FILE--
+<?php
+
+$conf = array(
+ 'config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf',
+ 'private_key_bits' => 511,
+);
+var_dump(openssl_pkey_new($conf));
+
+?>
+--EXPECT--
+bool(false)