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