Skip to content

Commit

Permalink
Merge pull request #30 from aws/truthyness_fix_openssl_verify
Browse files Browse the repository at this point in the history
Truthyness fix for openssl_verify.
  • Loading branch information
kstich authored Sep 27, 2017
2 parents 6ad16f0 + 2dca8f9 commit 7b8eee4
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 7b8eee4

Please sign in to comment.