From 2dca8f97be8408c08f45b17c7a0177631da30ddc Mon Sep 17 00:00:00 2001 From: stickevi Date: Wed, 27 Sep 2017 15:06:57 -0700 Subject: [PATCH] Truthyness fix for openssl_verify. --- src/MessageValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MessageValidator.php b/src/MessageValidator.php index e84a917..15ce1c6 100644 --- a/src/MessageValidator.php +++ b/src/MessageValidator.php @@ -98,7 +98,7 @@ public function validate(Message $message) // Verify the signature of the message. $content = $this->getStringToSign($message); $signature = base64_decode($message['Signature']); - if (!openssl_verify($content, $signature, $key, OPENSSL_ALGO_SHA1)) { + if (openssl_verify($content, $signature, $key, OPENSSL_ALGO_SHA1) != 1) { throw new InvalidSnsMessageException( 'The message signature is invalid.' );