Merge branch 'PHP-7.0' into PHP-7.1

This commit is contained in:
Jakub Zelenka 2017-10-22 18:57:14 +01:00
commit f10fd89f99
2 changed files with 5 additions and 3 deletions

View File

@ -23,9 +23,9 @@ var_dump(openssl_pkcs12_export($cert_path, $output, $priv_path, $pass)); // read
var_dump(openssl_pkcs12_read($output, $opts, $pass));
var_dump(openssl_pkcs12_export($cert_res, $output, $priv_res, $pass)); // read certs from a resource
var_dump(openssl_pkcs12_read($output, $opts, $pass));
var_dump(openssl_pkcs12_export($cert, $output, $priv, $pass, array($cert))); // extra optional cert
var_dump(openssl_pkcs12_export($cert, $output, $priv, $pass, array('extracerts' => $cert))); // extra optional cert
var_dump(openssl_pkcs12_read($output, $opts, $pass));
//var_dump(count($opts)); // should be 3 certificates, priv, pub, extra optional cert
var_dump(count($opts)); // should be 3 certificates, priv, pub, extra optional cert
var_dump(openssl_pkcs12_export($invalid, $output, $invalid, $pass));
@ -42,6 +42,7 @@ bool(true)
bool(true)
bool(true)
bool(true)
int(3)
Warning: openssl_pkcs12_export(): cannot get cert from parameter 1 in %s on line %d
bool(false)

View File

@ -16,7 +16,7 @@ $cert_res = openssl_x509_read($cert);
$priv_res = openssl_pkey_get_private($priv);
$pass = "test";
$invalid = "";
$invalid_path = "file:///tmp/php";
$invalid_path = dirname(__FILE__) . "/invalid_path";
$opts = [];
var_dump(openssl_pkcs12_export_to_file($cert, $pkcsfile, $priv, $pass));
@ -34,6 +34,7 @@ var_dump(openssl_pkcs12_export_to_file($priv_res, $pkcsfile, $cert_res, $pass));
?>
--CLEAN--
<?php
$pkcsfile = dirname(__FILE__) . "/openssl_pkcs12_export_to_file__pkcsfile.tmp";
if (file_exists($pkcsfile)) {
unlink($pkcsfile);
}