From f34d350c2649fb4dba5dcf521ef31d0eafb87b27 Mon Sep 17 00:00:00 2001 From: Jan-Sverre Riksfjord Date: Fri, 10 May 2024 13:27:18 +0200 Subject: [PATCH] better error message --- src/Library/KeyManagement/KeyConverter/KeyConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Library/KeyManagement/KeyConverter/KeyConverter.php b/src/Library/KeyManagement/KeyConverter/KeyConverter.php index 6227d2ef..05c277f8 100644 --- a/src/Library/KeyManagement/KeyConverter/KeyConverter.php +++ b/src/Library/KeyManagement/KeyConverter/KeyConverter.php @@ -219,7 +219,7 @@ private static function loadKeyFromPEM(string $pem, ?string $password = null): a $res = openssl_pkey_get_public($pem); } if ($res === false) { - throw new InvalidArgumentException('Unable to load the key.'); + throw new InvalidArgumentException('Unable to load the key. Error: ' . openssl_error_string()); } $details = openssl_pkey_get_details($res);