mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-11 10:56:17 +08:00
Add PHP Extension for GmSSL
View http://gmssl.org/docs/php-api.html for more info.
This commit is contained in:
19
php/ext/openssl/tests/bug65698.phpt
Normal file
19
php/ext/openssl/tests/bug65698.phpt
Normal file
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #65689 (GeneralizedTime format parsing)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$crt = substr(__FILE__, 0, -4).'.crt';
|
||||
$info = openssl_x509_parse("file://$crt");
|
||||
var_dump($info["validFrom"], $info["validFrom_time_t"], $info["validTo"], $info["validTo_time_t"]);
|
||||
?>
|
||||
Done
|
||||
--EXPECTF--
|
||||
string(15) "20090303125318Z"
|
||||
int(12360%d)
|
||||
string(15) "20240303125318Z"
|
||||
int(17094%d)
|
||||
Done
|
||||
Reference in New Issue
Block a user