Made message signing in Cryptography use SHA512 as the message content for... #1

Closed
netkas wants to merge 421 commits from master into dev
Showing only changes of commit 5e26b08f9e - Show all commits

View file

@ -104,7 +104,7 @@
*/ */
public function getState(): SigningKeyState public function getState(): SigningKeyState
{ {
if(time() > $this->expires) if($this->expires > 0 && time() > $this->expires)
{ {
return SigningKeyState::EXPIRED; return SigningKeyState::EXPIRED;
} }
@ -143,7 +143,7 @@
'uuid' => $record->getUuid(), 'uuid' => $record->getUuid(),
'name' => $record->getName(), 'name' => $record->getName(),
'public_key' => $record->getPublicKey(), 'public_key' => $record->getPublicKey(),
'state' => $record->getState(), 'state' => $record->getState()->value,
'expires' => $record->getExpires(), 'expires' => $record->getExpires(),
'created' => $record->getCreated() 'created' => $record->getCreated()
]); ]);
@ -166,7 +166,7 @@
'uuid' => $this->uuid, 'uuid' => $this->uuid,
'name' => $this->name, 'name' => $this->name,
'public_key' => $this->publicKey, 'public_key' => $this->publicKey,
'state' => $this->state->value, 'state' => $this->getState()->value,
'expires' => $this->expires, 'expires' => $this->expires,
'created' => $this->created 'created' => $this->created
]; ];