xref: /PHP-7.4/ext/openssl/tests/bug68912.phpt (revision 782352c5)
1--TEST--
2Bug #68912 (Segmentation fault at openssl_spki_new)
3--SKIPIF--
4<?php
5if (!extension_loaded("openssl")) die("skip");
6if (!@openssl_pkey_new()) die("skip cannot create private key");
7?>
8--FILE--
9<?php
10
11$var1=fopen(__FILE__, 'r');
12$var2=2;
13$var3=3;
14
15openssl_spki_new($var1, $var2, $var3);
16?>
17--EXPECTF--
18Warning: openssl_spki_new(): supplied resource is not a valid OpenSSL X.509/key resource in %sbug68912.php on line %d
19
20Warning: openssl_spki_new(): Unable to use supplied private key in %sbug68912.php on line %d
21