Add test coverage for the SSH key endpoints
This commit is contained in:
parent
97280a62a2
commit
6554164252
7 changed files with 201 additions and 7 deletions
|
@ -43,11 +43,11 @@ class StoreSSHKeyRequest extends ClientApiRequest
|
|||
}
|
||||
|
||||
if ($this->key instanceof DSA) {
|
||||
$this->validator->errors()->add('public_key', 'DSA public keys are not supported.');
|
||||
$this->validator->errors()->add('public_key', 'DSA keys are not supported.');
|
||||
}
|
||||
|
||||
if ($this->key instanceof RSA && $this->key->getLength() < 2048) {
|
||||
$this->validator->errors()->add('public_key', 'RSA keys must be at 2048 bytes.');
|
||||
$this->validator->errors()->add('public_key', 'RSA keys must be at least 2048 bytes in length.');
|
||||
}
|
||||
|
||||
$fingerprint = $this->key->getFingerprint('sha256');
|
||||
|
|
Reference in a new issue