{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-php-sns-message-validator/issues/32","repository_url":"https://api.github.com/repos/aws/aws-php-sns-message-validator","labels_url":"https://api.github.com/repos/aws/aws-php-sns-message-validator/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-php-sns-message-validator/issues/32/comments","events_url":"https://api.github.com/repos/aws/aws-php-sns-message-validator/issues/32/events","html_url":"https://github.com/aws/aws-php-sns-message-validator/issues/32","id":272179497,"number":32,"title":"Split up missing and invalid certificate errors","user":{"login":"smhg","id":2411348,"avatar_url":"https://avatars3.githubusercontent.com/u/2411348?v=4","gravatar_id":"","url":"https://api.github.com/users/smhg","html_url":"https://github.com/smhg","followers_url":"https://api.github.com/users/smhg/followers","following_url":"https://api.github.com/users/smhg/following{/other_user}","gists_url":"https://api.github.com/users/smhg/gists{/gist_id}","starred_url":"https://api.github.com/users/smhg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smhg/subscriptions","organizations_url":"https://api.github.com/users/smhg/orgs","repos_url":"https://api.github.com/users/smhg/repos","events_url":"https://api.github.com/users/smhg/events{/privacy}","received_events_url":"https://api.github.com/users/smhg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-08T12:22:54Z","updated_at":"2018-02-20T10:36:34Z","closed_at":null,"author_association":"NONE","body":"The `Cannot get the public key from the certificate.` [error](https://github.com/aws/aws-php-sns-message-validator/blob/7b8eee4a56fe27d70395f1d87cc35a0651889d9f/src/MessageValidator.php#L93) gets thrown in these circumstances:\r\n\r\n- When `openssl_pkey_get_public` can't extract the key and returns `false`.\r\n- When the certClient can't read the certificate.\r\n\r\nThe latter happens fairly regularly because of network issues. When using the default certClient (`file_get_contents`) the `$certificate` variable will contain `false` (and a PHP Warning will get logged).\r\nCould this get checked separately from the first circumstance?\r\n\r\nA possible issue is a custom certClient which returns something different.\r\nOn the other hand, having $certificate === false throw a separate error sounds quite harmless.\r\n\r\nI'm happy to send a PR if this sounds good."},"comment":{"url":"https://api.github.com/repos/aws/aws-php-sns-message-validator/issues/comments/366936229","html_url":"https://github.com/aws/aws-php-sns-message-validator/issues/32#issuecomment-366936229","issue_url":"https://api.github.com/repos/aws/aws-php-sns-message-validator/issues/32","id":366936229,"user":{"login":"smhg","id":2411348,"avatar_url":"https://avatars3.githubusercontent.com/u/2411348?v=4","gravatar_id":"","url":"https://api.github.com/users/smhg","html_url":"https://github.com/smhg","followers_url":"https://api.github.com/users/smhg/followers","following_url":"https://api.github.com/users/smhg/following{/other_user}","gists_url":"https://api.github.com/users/smhg/gists{/gist_id}","starred_url":"https://api.github.com/users/smhg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smhg/subscriptions","organizations_url":"https://api.github.com/users/smhg/orgs","repos_url":"https://api.github.com/users/smhg/repos","events_url":"https://api.github.com/users/smhg/events{/privacy}","received_events_url":"https://api.github.com/users/smhg/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T10:36:34Z","updated_at":"2018-02-20T10:36:34Z","author_association":"NONE","body":"I'm sorry to keep pinging you @kstich, but a release with this change would still be much appreciated."}}
{"actor":{"display_login":"smhg"}}