-
Notifications
You must be signed in to change notification settings - Fork 582
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
Fix SNI tests for LibreSSL #2041
base: main
Are you sure you want to change the base?
Conversation
I'm not sure what the right solution is but I'll note that attempting to connect to localhost breaks more often. |
We might first check that either localhost resolves or check /etc/hosts for localhost, otherwise skip the test. |
And don't forget to squash your commits. |
I'm referring here to the change in Mojo::IOLoop::Client, which will affect all existing code. |
Sure thing. I didn't check enough PRs to see if it was common to force-push mid-review, and I prefer not to do so. Will squash once / if this ready to be merged.
Well, to be honest, it was done a bit out of laziness. I can do a second pass thru the tests replacing all the instances of unset address with |
If i remember correctly, last time we used |
I rolled back the change for
|
That resolves my primary concern, installation tests failing is much less of a problem than potential application behavior changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may break tests in other instances, but as you describe, there's no other way to fix it for LibreSSL. Perltidy failure looks unrelated
Test failure for me:
and the test hung |
More info:
M1 Max Macbook Pro running Ventura, and I should note, my tests don't fail when running the tests in the main branch. |
Under OpenBSD, I'm testing with
This all started when I was trying to update the Mojo port in OpenBSD, which currently sits at 8.22. In the process, I started porting some deps ( I also have a M1 lying around and will try the test suite in there. |
Except for versions, that's the same combination that failed for you. I'll try tomorrow with the Mac. |
Managed to test this on MacOS, althought on an older version of Perl than yours, @jberger . Faced the same issue; fixed it sprinkling more |
So, after a bit more of experimenting, I think I nailed down the issue: I believe that what's happening is that the servers that are bound to The last commit makes OpenBSD is still happy with the latest commit:
|
Squashed the commits and rebased against |
Rebased against latest |
Ping. Rebased against latest |
re-testing:
and at that point the test hung |
But actually now I'm getting the same test failures both in the PR branch and main |
Hi! I rebased this patch and added a new commit that deals with TLSv1.0 and TLSv1.1 being disabled in LibreSSL since 3.8.1. Let me know if I should keep this split in two commits or if I should squash them together. All the tests pass. Without the second commit and with LibreSSL 3.8.1 or newer, the last 2 tests from |
Since beginning of 2022, LibreSSL dropped support for IP addresses in SNI. This is aligned to RFC 6066, section 3: > Literal IPv4 and IPv6 addresses are not permitted in "HostName". In order to deal with it, clients connect to "localhost" instead of "127.0.0.1" and adjust "server.crt" to use "localhost" as Common Name instead of "127.0.0.1". Adjust TLS version for LibreSSL deprecation of TLSv1.1 and older.
We probably should fix all TLS tests to work with github actions again first. |
Since beginning of 2022, LibreSSL dropped support for IP addresses in SNI. This is aligned to RFC 6066, section 3:
In order to deal with it, make servers listen on and clients connect to "localhost" instead of "127.0.0.1", adjust "server.crt" to use "localhost" as Common Name instead of "127.0.0.1", and default Mojo::IOLoop::Client address to "localhost" instead of "127.0.0.1".
Summary
Check commit message.
Motivation
I use OpenBSD, which ships with LibreSSL.
References
Didn't find any.