From 167bbe514f9808bc1e03804311b39f463a0a76fe Mon Sep 17 00:00:00 2001 From: Andrew Ivchenkov Date: Mon, 1 Apr 2019 15:44:21 +0300 Subject: [PATCH] Detailed error --- src/UrlConverter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UrlConverter.php b/src/UrlConverter.php index f5d8a40..9cbf355 100644 --- a/src/UrlConverter.php +++ b/src/UrlConverter.php @@ -53,7 +53,8 @@ private function parseUrl($ampUrl) private function signPath($path) { if (!@openssl_sign($path, $signature, $this->privateKey, OPENSSL_ALGO_SHA256)) { - throw new AmpCacheException("Failed to sign the $path"); + $error = openssl_error_string(); + throw new AmpCacheException("Failed to sign the $path: $error"); } return $this->base64encode($signature); }