RSA: loading keys could error out if xml extension wasn't installed

This commit is contained in:
terrafrost 2022-07-13 09:06:33 -05:00
parent 978b2adbfc
commit 9fae7ec89d

View File

@ -1470,6 +1470,10 @@ class Crypt_RSA
// http://en.wikipedia.org/wiki/XML_Signature
case CRYPT_RSA_PRIVATE_FORMAT_XML:
case CRYPT_RSA_PUBLIC_FORMAT_XML:
if (!extension_loaded('xml')) {
return false;
}
$this->components = array();
$xml = xml_parser_create('UTF-8');