-
Notifications
You must be signed in to change notification settings - Fork 421
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
21.0.0 regression: FAILED tests/test_ssl.py::TestApplicationLayerProtoNegotiation::test_alpn_call_failure #1043
Comments
(or on OpenSSL built with SSLv3 support?) |
Interesting -- we're not seeing this test failure in our CI, but looking more closely we don't actually have tests that run against 1.1.1-latest (e.g. we don't test pyOpenSSL against the binary wheel most cryptography users get). This is a shortcoming of our CI we should rectify and then we can investigate a bit more with why this is happening. @mgorny does this occur on 20.0.1? If you run the test suite there with cryptography 3.4.8 does it pass or fail this test? |
It does not but I think it's a shortcoming in 20.0.1. A quick bisect points to the following commit:
This kinda makes sense given that this commit added the test ;-). |
This should fail CI, because we'll start catching pyca#1043
CC @mhils So I looked at this a bit. Findings so far: The reason the test was added was because formerly, pyopenssl forgot to check for errors after calling In new versions of openssl, an empty protos list is now legal, and explicitly disables ALPN. So this is no longer raising an error. I don't know how to provoke an error from So, I see two options: Option 1: We could reject empty protocol lists up-front in our wrapper code.
Option 2: We could allow through empty lists like now, but adapt the test to do something like: pass in an empty and discard any error, and then verify that the openssl error stack is clean. I'm inclined to go with option 1. The only real risk is if we regressed by accidentally deleting the |
I vote for option 1 so let's go down that path for now. We can always expose disable ALPN as a separate API later and if we're concerned about useless cruft on the error stack we can use cryptography's consume_errors logic. |
This should fail CI, because we'll start catching pyca#1043
The 21.0.0 release (and git main) fail the following test:
Does it perhaps rely on specific OpenSSL version or distribution patches?
Full log: tox.txt; excerpt below.
The text was updated successfully, but these errors were encountered: