SSH/Agent: EC keys didn't work with agent

This commit is contained in:
terrafrost 2021-01-25 12:21:14 -06:00
parent 3d4767301c
commit 1795b5df6a

View File

@ -119,7 +119,7 @@ class Identity implements PrivateKey
*/ */
public function withPublicKey($key) public function withPublicKey($key)
{ {
if ($key instanceof ECDSA) { if ($key instanceof EC) {
if (is_array($key->getCurve()) || !isset(self::$curveAliases[$key->getCurve()])) { if (is_array($key->getCurve()) || !isset(self::$curveAliases[$key->getCurve()])) {
throw new UnsupportedAlgorithmException('The only supported curves are nistp256, nistp384, nistp512 and Ed25519'); throw new UnsupportedAlgorithmException('The only supported curves are nistp256, nistp384, nistp512 and Ed25519');
} }