Skip to content

Commit

Permalink
Extend openssl_csr_sign test to cover cert resource
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Oct 30, 2017
1 parent 80191ee commit 628a52d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/openssl/tests/openssl_csr_sign_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ $csr = openssl_csr_new($dn, $privkey, $args);
var_dump(openssl_csr_sign($csr, null, $privkey, 365, $args));
var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
var_dump(openssl_csr_sign($csr, $cert, $priv, 365, $config_arg));
var_dump(openssl_csr_sign($csr, openssl_x509_read($cert), $priv, 365, $config_arg));
var_dump(openssl_csr_sign($csr, $wrong, $privkey, 365));
var_dump(openssl_csr_sign($csr, null, $wrong, 365));
var_dump(openssl_csr_sign($csr, null, $privkey, $wrong));
Expand All @@ -47,6 +48,7 @@ var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
resource(%d) of type (OpenSSL X.509)
resource(%d) of type (OpenSSL X.509)
resource(%d) of type (OpenSSL X.509)
resource(%d) of type (OpenSSL X.509)

Warning: openssl_csr_sign(): cannot get cert from parameter 2 in %s on line %d
bool(false)
Expand Down

0 comments on commit 628a52d

Please sign in to comment.