Skip to content

Commit 4b22409

Browse files
author
Anton Medvedev
committed
Update PhpSecLib.php
1 parent 425b16c commit 4b22409

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Server/PhpSecLib.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class PhpSecLib extends AbstractServer
2525
*/
2626
public function connect()
2727
{
28-
$this->sftp = new \Net_SFTP($this->config->getHost(), $this->config->getPort());
28+
$this->sftp = new \phpseclib\Net\SFTP($this->config->getHost(), $this->config->getPort());
2929

3030
switch ($this->config->getAuthenticationMethod()) {
3131
case Configuration::AUTH_BY_PASSWORD:
@@ -38,7 +38,7 @@ public function connect()
3838

3939
case Configuration::AUTH_BY_PUBLIC_KEY:
4040

41-
$key = new \Crypt_RSA();
41+
$key = new \phpseclib\Crypt\RSA();
4242
$key->setPassword($this->config->getPassPhrase());
4343
$key->loadKey(file_get_contents($this->config->getPrivateKey()));
4444

@@ -50,7 +50,7 @@ public function connect()
5050

5151
case Configuration::AUTH_BY_PEM_FILE:
5252

53-
$key = new \Crypt_RSA();
53+
$key = new \phpseclib\Crypt\RSA();
5454
$key->loadKey(file_get_contents($this->config->getPemFile()));
5555
if (!$this->sftp->login($this->config->getUser(), $key)) {
5656
throw new \RuntimeException('Could not login with PhpSecLib.');

0 commit comments

Comments
 (0)