Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/sshkey/PhabricatorAuthSSHPrivateKey.php
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | public function newBarePrivateKey() { | ||||
} | } | ||||
// If that worked, the key is good and the (possibly empty) passphrase is | // If that worked, the key is good and the (possibly empty) passphrase is | ||||
// correct. Strip the passphrase if we have one, then return the bare key. | // correct. Strip the passphrase if we have one, then return the bare key. | ||||
if (!$err) { | if (!$err) { | ||||
if ($passphrase) { | if ($passphrase) { | ||||
execx( | execx( | ||||
'ssh-keygen -y -P %P -N %s -f %R', | 'ssh-keygen -p -P %P -N %s -f %R', | ||||
$passphrase, | $passphrase, | ||||
'', | '', | ||||
$tmp); | $tmp); | ||||
$new_body = new PhutilOpaqueEnvelope(Filesystem::readFile($tmp)); | $new_body = new PhutilOpaqueEnvelope(Filesystem::readFile($tmp)); | ||||
unset($tmp); | unset($tmp); | ||||
} else { | } else { | ||||
$new_body = $old_body; | $new_body = $old_body; | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |