From fc87edce6ed8b3321ca905a3e6b622fc6a9fbd0a Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 30 Mar 2020 00:19:45 -0500 Subject: [PATCH] PKCS8: throw an exception when no ASN1 maps can be used --- phpseclib/Crypt/Common/Formats/Keys/PKCS8.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php b/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php index 8d0f950e..f8c199de 100644 --- a/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php @@ -513,7 +513,7 @@ abstract class PKCS8 extends PKCS return $public; } - return false; + throw new \RuntimeException('Unable to parse using either OneAsymmetricKey or PublicKeyInfo ASN1 maps'); } /**