-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split up missing and invalid certificate errors #32
Comments
Separating the error messages seems like a good idea to me, especially since it's possible the default client can fail to retrieve. Given that |
That sounds like the right thing to do, yes. |
After running through a few tests, it looks like other false-y values don't cause any issues for |
Hi @kstich! Anything I can help with to get this merged into master? |
I'm sorry to keep pinging you @kstich, but a release with this change would still be much appreciated. |
The
Cannot get the public key from the certificate.
error gets thrown in these circumstances:openssl_pkey_get_public
can't extract the key and returnsfalse
.The latter happens fairly regularly because of network issues. When using the default certClient (
file_get_contents
) the$certificate
variable will containfalse
(and a PHP Warning will get logged).Could this get checked separately from the first circumstance?
A possible issue is a custom certClient which returns something different.
On the other hand, having $certificate === false throw a separate error sounds quite harmless.
I'm happy to send a PR if this sounds good.
The text was updated successfully, but these errors were encountered: