Page MenuHomePhabricator
Authored By
epriestley
Jan 5 2014, 10:29 PM
Size
851 B
Referenced Files
None
Subscribers
None

nuke.diff

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();
+ }
+ }
+
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/sf/eb/gowlmel4qa5v5l7k
Default Alt Text
nuke.diff (851 B)

Event Timeline