Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/sshkey/PhabricatorAuthSSHPublicKey.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | public static function newFromRawKey($entire_key) { | ||||
} | } | ||||
list($type, $body, $comment) = $parts; | list($type, $body, $comment) = $parts; | ||||
$recognized_keys = array( | $recognized_keys = array( | ||||
'ssh-dsa', | 'ssh-dsa', | ||||
'ssh-dss', | 'ssh-dss', | ||||
'ssh-rsa', | 'ssh-rsa', | ||||
'ssh-ed25519', | |||||
'ecdsa-sha2-nistp256', | 'ecdsa-sha2-nistp256', | ||||
'ecdsa-sha2-nistp384', | 'ecdsa-sha2-nistp384', | ||||
'ecdsa-sha2-nistp521', | 'ecdsa-sha2-nistp521', | ||||
); | ); | ||||
if (!in_array($type, $recognized_keys)) { | if (!in_array($type, $recognized_keys)) { | ||||
$type_list = implode(', ', $recognized_keys); | $type_list = implode(', ', $recognized_keys); | ||||
throw new Exception( | throw new Exception( | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |