Skip to content

Commit

Permalink
CLI-1397: Exception on local non-RSA SSH keys
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Sep 20, 2024
1 parent 1139728 commit b592189
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Command/Ssh/SshKeyCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,6 @@ protected function uploadSshKey(string $label, string $publicKey): void

protected static function getFingerprint(mixed $sshPublicKey): string
{
if (!str_starts_with($sshPublicKey, 'ssh-rsa ')) {
throw new AcquiaCliException('SSH keys must start with "ssh-rsa ".');
}
$content = explode(' ', $sshPublicKey, 3);
return base64_encode(hash('sha256', base64_decode($content[1]), true));
}
Expand Down

0 comments on commit b592189

Please sign in to comment.