mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
update days calculation
This commit is contained in:
parent
62cb6d2249
commit
cd38fe6fbe
1 changed files with 4 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ use \OpenSSLCertificate;
|
|||
class Gemini extends \Yggverse\Yoda\Abstract\Model\Identity
|
||||
{
|
||||
// Init defaults
|
||||
public const CSR_SIGN_DATE = '99991231235959Z';
|
||||
public const CSR_SIGN_TIME = 253402300799; // U 9999-12-31 23:59:59
|
||||
|
||||
// Init identity variables
|
||||
protected OpenSSLAsymmetricKey $_key;
|
||||
|
|
@ -32,9 +32,9 @@ class Gemini extends \Yggverse\Yoda\Abstract\Model\Identity
|
|||
),
|
||||
$this->_key,
|
||||
null,
|
||||
intval( // use max possible certificate age for user identities
|
||||
floor(
|
||||
(strtotime(self::CSR_SIGN_DATE) - time()) / (60 * 60 * 24)
|
||||
intval(
|
||||
floor( // calculate max possible identity age, days
|
||||
(self::CSR_SIGN_TIME - time()) / (60 * 60 * 24)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue