From 25b328c440cdf1e291ec28b8823a3a615ae28e02 Mon Sep 17 00:00:00 2001 From: montdidier Date: Thu, 5 Feb 2015 13:19:57 +0800 Subject: [PATCH] removed stopSSHForwarding --- phpseclib/System/SSH/Agent.php | 15 --------------- tests/Functional/Net/SSH2AgentTest.php | 3 --- 2 files changed, 18 deletions(-) diff --git a/phpseclib/System/SSH/Agent.php b/phpseclib/System/SSH/Agent.php index 1b09a34d..f07c267d 100644 --- a/phpseclib/System/SSH/Agent.php +++ b/phpseclib/System/SSH/Agent.php @@ -350,21 +350,6 @@ class System_SSH_Agent } } - /** - * Request the remote server to stop forwarding authentication requests to the local SSH agent - * - * @param Net_SSH2 $ssh - * @return Boolean - * @access public - */ - function stopSSHForwarding($ssh) - { - if ($this->request_forwarding) { - $ssh->_close_channel(NET_SSH2_CHANNEL_AGENT_FORWARD); - $this->request_forwarding = false; - } - } - /** * The worker function to make a request to a remote server * asking it to forward authentication requests to the local SSH diff --git a/tests/Functional/Net/SSH2AgentTest.php b/tests/Functional/Net/SSH2AgentTest.php index e291cac2..7ba57d5c 100644 --- a/tests/Functional/Net/SSH2AgentTest.php +++ b/tests/Functional/Net/SSH2AgentTest.php @@ -47,9 +47,6 @@ class Functional_Net_SSH2AgentTest extends PhpseclibFunctionalTestCase $agent->startSSHForwarding($ssh); $this->assertEquals($username, trim($ssh->exec("ssh " . $username . "@" . $hostname . ' \'whoami\''))); - $agent->stopSSHForwarding($ssh); - $this->assertEquals('failure?', trim($ssh->exec("ssh " . $username . "@" . $hostname . ' \'whoami\''))); - return $args; } }