mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-12 03:16:25 +08:00
Add PHP Extension for GmSSL
View http://gmssl.org/docs/php-api.html for more info.
This commit is contained in:
16
php/ext/openssl/tests/openssl_x509_free_basic.phpt
Normal file
16
php/ext/openssl/tests/openssl_x509_free_basic.phpt
Normal file
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
openssl_x509_free() tests
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("openssl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump($res = openssl_x509_read("file://" . dirname(__FILE__) . "/cert.crt"));
|
||||
openssl_x509_free($res);
|
||||
var_dump($res);
|
||||
openssl_x509_free(false);
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (OpenSSL X.509)
|
||||
resource(%d) of type (Unknown)
|
||||
|
||||
Warning: openssl_x509_free() expects parameter 1 to be resource, boolean given in %s on line %d
|
||||
Reference in New Issue
Block a user