Skip to content

Commit

Permalink
Truthyness fix for openssl_verify.
Browse files Browse the repository at this point in the history
  • Loading branch information
kstich committed Sep 27, 2017
1 parent 6ad16f0 commit 2dca8f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MessageValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
);
Expand Down

0 comments on commit 2dca8f9

Please sign in to comment.