1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-04 18:48:24 +01:00

SFTP/Stream: expand private key support to more than just RSA

This commit is contained in:
terrafrost 2020-02-22 22:21:19 -06:00
parent cb75dd33bf
commit e8da444bb7

View File

@ -17,7 +17,7 @@
namespace phpseclib3\Net\SFTP;
use phpseclib3\Crypt\RSA;
use phpseclib3\Crypt\Common\PrivateKey;
use phpseclib3\Net\SFTP;
use phpseclib3\Net\SSH2;
@ -204,7 +204,7 @@ class Stream
if (isset($context[$scheme]['password'])) {
$pass = $context[$scheme]['password'];
}
if (isset($context[$scheme]['privkey']) && $context[$scheme]['privkey'] instanceof RSA) {
if (isset($context[$scheme]['privkey']) && $context[$scheme]['privkey'] instanceof PrivateKey) {
$pass = $context[$scheme]['privkey'];
}