From 711d80960e0339c30aafa016884842a6c8981417 Mon Sep 17 00:00:00 2001 From: Marco Villegas Date: Mon, 18 Nov 2013 00:25:17 -0500 Subject: [PATCH] Provide more detail on ssl_signed_json wrapper plugin error on openssl_pkcs7_verify(). --- src/ChamiloLMS/Transaction/Plugin/SslSignedJsonWrapper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChamiloLMS/Transaction/Plugin/SslSignedJsonWrapper.php b/src/ChamiloLMS/Transaction/Plugin/SslSignedJsonWrapper.php index b0817aaa24..53f6f69ebb 100644 --- a/src/ChamiloLMS/Transaction/Plugin/SslSignedJsonWrapper.php +++ b/src/ChamiloLMS/Transaction/Plugin/SslSignedJsonWrapper.php @@ -208,7 +208,11 @@ class SslSignedJsonWrapper extends JsonWrapper } elseif ($sign_verification === FALSE) { throw new UnwrapException(self::format_log(sprintf('Signed file "%s" failed verification.', $signed_transactions_file))); } else { // -1 - throw new UnwrapException(self::format_log(sprintf('There was an error during the signature verification for signed file "%s".', $signed_transactions_file))); + $ssl_error_message = ''; + while ($ssl_error_message = openssl_error_string()) { + $ssl_error_message .= "\n"; + } + throw new UnwrapException(self::format_log(sprintf('There was an error during the signature verification for signed file "%s": %s', $signed_transactions_file, $ssl_error_message))); } unlink($signed_transactions_file); unlink($signer_certificates_file);