mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 21:17:53 +00:00
Allow to pass end date as DateTime
This commit is contained in:
parent
7b7d254a6c
commit
cce21f077f
@ -3061,7 +3061,7 @@ class X509
|
||||
|
||||
-- http://tools.ietf.org/html/rfc5280#section-4.1.2.5
|
||||
*/
|
||||
if (strtolower($date) == 'lifetime') {
|
||||
if (is_string($date) && strtolower($date) === 'lifetime') {
|
||||
$temp = '99991231235959Z';
|
||||
$temp = chr(ASN1::TYPE_GENERALIZED_TIME) . ASN1::encodeLength(strlen($temp)) . $temp;
|
||||
$this->endDate = new Element($temp);
|
||||
|
Loading…
Reference in New Issue
Block a user