From cacd08a768474313a4ce04d631c6a0d35c789a6d Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 3 Feb 2020 00:56:37 -0600 Subject: [PATCH] Agent/Identity: ECDSA -> EC --- phpseclib/System/SSH/Agent/Identity.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpseclib/System/SSH/Agent/Identity.php b/phpseclib/System/SSH/Agent/Identity.php index 3eb1f6e2..b18e27e2 100644 --- a/phpseclib/System/SSH/Agent/Identity.php +++ b/phpseclib/System/SSH/Agent/Identity.php @@ -18,7 +18,7 @@ namespace phpseclib3\System\SSH\Agent; use phpseclib3\Crypt\RSA; use phpseclib3\Crypt\DSA; -use phpseclib3\Crypt\ECDSA; +use phpseclib3\Crypt\EC; use phpseclib3\Exception\UnsupportedAlgorithmException; use phpseclib3\System\SSH\Agent; use phpseclib3\Common\Functions\Strings; @@ -192,7 +192,7 @@ class Identity implements PrivateKey throw new UnsupportedAlgorithmException('The only supported hashes for RSA are sha1, sha256 and sha512'); } } - if ($this->key instanceof ECDSA) { + if ($this->key instanceof EC) { switch ($this->key->getCurve()) { case 'secp256r1': $expectedHash = 'sha256'; @@ -247,7 +247,7 @@ class Identity implements PrivateKey public function withSignatureFormat($format) { if ($this->key instanceof RSA) { - throw new UnsupportedAlgorithmException('Only DSA and ECDSA keys support signature format setting'); + throw new UnsupportedAlgorithmException('Only DSA and EC keys support signature format setting'); } if ($format != 'SSH2') { throw new UnsupportedAlgorithmException('Only SSH2-formatted signatures are currently supported'); @@ -266,8 +266,8 @@ class Identity implements PrivateKey */ public function getCurve() { - if (!$this->key instanceof ECDSA) { - throw new UnsupportedAlgorithmException('Only ECDSA keys have curves'); + if (!$this->key instanceof EC) { + throw new UnsupportedAlgorithmException('Only EC keys have curves'); } return $this->key->getCurve();