From 94d3403ed33e8a85520eb0555b906c6d94328743 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 8 Apr 2020 06:15:18 -0500 Subject: [PATCH] getLoadedFormat() threw exception for loadFormat()-loaded keys --- phpseclib/Crypt/Common/AsymmetricKey.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpseclib/Crypt/Common/AsymmetricKey.php b/phpseclib/Crypt/Common/AsymmetricKey.php index b2da0aa2..f3efb733 100644 --- a/phpseclib/Crypt/Common/AsymmetricKey.php +++ b/phpseclib/Crypt/Common/AsymmetricKey.php @@ -206,6 +206,7 @@ abstract class AsymmetricKey $components['format'] = $format; $new = static::onLoad($components); + $new->format = $format; return $new instanceof PrivateKey ? $new->withPassword($password) : $new;