-
Notifications
You must be signed in to change notification settings - Fork 3k
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
SSL problem with OTP 27.1.3 #9208
Comments
This behavior is related to fixing a vulnerability of misusage of certificate purposes. That was previous too relaxed. From RFC: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.12
These extended key-usages {1, 3, 6, 1, 5, 5, 7, 3, 2}, {1, 3, 6, 1, 5, 5, 7, 3, 1} are the oids for id-kp-serverAuth and id-kp-clientAuth Also from RFC:
If the certificate failing is a CA cert it can also be allowed if the CA cert also assert the anyExtendedKeyUsage and the ssl configuration adds the option allow_any_ca_purpose is configured to be true. So the proper thing to so is to get you certificates correct, and your last option would be to have your own verify_fun that |
I am lost here: why does Erlang :ssl not allow a connection with the server here while I do not get any error messages when I use any other tool or browser? Isn't Erlang :ssl too strict here and aren't we suffering because everyone else can connect without a problem with a server that has such a certificate while we using the latest Erlang OTP can't? |
@IngelaAndin how can I sidestep this in a minimal way? Do I have to feed |
@tarzan I can not answer your question unless you tell me how your certificate that you think should work but does not looks. |
I am trying to connect to server controlled by the Dutch government, in order to fetch FederationMetadata to be used for single sign on. I get an error message similar to the OP:
This is the server and certificate:
|
I've been following this issue, as we've had to rollback an Erlang release because we need to connect to a Dutch govt site as well (https://chat.ind.nl). I've not looked into it deeply yet, and it may well be that there is a certificate issue, but I second the observation that there seems to be no other tool that rejects this certificate, not do any of the TLS quality scanners. |
Well, this seems really strange. I was using OpenSSL extensively to try and double check the understanding of how this should work. But right now I do not seem to be able to reproduce that. So I will have to investigate this further next week. |
We ended up implementing our own |
I just realized that a difference between this cert and some other certs that we saw failing is that this cert has keyCertSign bit set. |
Thanks a lot for all the replies, glad you're willing to look into this some more :) @egze if you're willing, I would be very much interested in seeing the custom |
@egze 👍 |
Hi and thanks for looking into it! My team supports that accepting it is correct for these reasons:
This means the concrete result of the current (OTP 27.1.3) behavior is to reject intermediate certificates whose key isn't used to sign OSCP responses, which is clearly not the intent of RFC 5280. (Edit: this is also a good reference explaining OpenSSL's behavior: https://docs.openssl.org/master/man1/openssl-verification-options/#extended-key-usage) |
Well yes this part support the current suggested solution in #8806
Thanks, I already read this several times. The alternative would be to make the exception in the id-kp-serverAuth and id-kp-clientAuth in the ssl (TLS) applications own verify_fun, but I am leaning to that this check belongs in public_key and that it will not affect other than TLS applications. |
Describe the bug
On OTP 27.1.3 connection to an API endpoint stopped working, and it worked fine with OTP 26.
Not really sure where to start looking.
Affected versions
27.1.3
The text was updated successfully, but these errors were encountered: