Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1041
nuke.diff
Active
Public
Actions
Authored by
epriestley
on Jan 5 2014, 10:29 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F98584: nuke.diff
Jan 5 2014, 10:29 PM
2014-01-05 22:29:36 (UTC+0)
Subscribers
None
diff --git a/scripts/ssh/ssh-connect.php b/scripts/ssh/ssh-connect.php
index 8a14209..12fee70 100755
--- a/scripts/ssh/ssh-connect.php
+++ b/scripts/ssh/ssh-connect.php
@@ -65,4 +65,8 @@ array_unshift($arguments, $pattern);
$err = newv('PhutilExecPassthru', $arguments)
->execute();
+if (isset($key)) {
+ $key->nuke();
+}
+
exit($err);
diff --git a/src/applications/passphrase/keys/PassphraseSSHKey.php b/src/applications/passphrase/keys/PassphraseSSHKey.php
index 4ba5025..ee9f92b 100644
--- a/src/applications/passphrase/keys/PassphraseSSHKey.php
+++ b/src/applications/passphrase/keys/PassphraseSSHKey.php
@@ -37,4 +37,10 @@ final class PassphraseSSHKey extends PassphraseAbstractKey {
return $credential->getSecret();
}
+ public function nuke() {
+ if ($this->keyFile) {
+ $this->keyFile->__destruct();
+ }
+ }
+
}
Event Timeline
epriestley
edited the content of this paste.
(Show Details)
Jan 5 2014, 10:29 PM
2014-01-05 22:29:36 (UTC+0)
epriestley
changed the title of this paste from untitled to
nuke.diff
.
epriestley
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment