Store keys in standard format; query with fingerprint not public key

This commit is contained in:
DaneEveritt 2022-05-15 16:41:15 -04:00
parent b563f13d09
commit a9364061c1
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 19 additions and 3 deletions

View file

@ -57,6 +57,14 @@ class StoreSSHKeyRequest extends ClientApiRequest
});
}
/**
* Returns the public key but formatted in a consistent manner.
*/
public function getPublicKey(): string
{
return $this->key->toString('PKCS8');
}
/**
* Returns the SHA256 fingerprint of the key provided.
*/