Skip to content

openssl: Fix openssl_pkcs12_export extracerts test #2681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ext/openssl/tests/openssl_pkcs12_export_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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)
Expand Down