Skip to content
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

handle openssl3 error in ssl tests #655

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

radez
Copy link

@radez radez commented Apr 2, 2024

Using OpenSSL 3, the expected error string caught in ssl tests has changed.
E AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1000)'

This is already handled for OpenSSL pre-1.1 and gte-1.1, adding handling for OpenSSL 3+

Fixes: #645

What kind of change does this PR introduce?

  • 🐞 bug fix
  • 🐣 feature
  • 📋 docs update
  • 📋 tests/coverage improvement
  • 📋 refactoring
  • 💥 other

📋 Contribution checklist:

(If you're a first-timer, check out
this guide on making great pull requests)

  • I wrote descriptive pull request text above
  • I think the code is well written
  • I wrote good commit messages
  • I have squashed related commits together after
    the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences

This change is Reviewable

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Merging #655 (b7e089b) into main (41584b8) will decrease coverage by 0.02%.
Report is 2 commits behind head on main.
The diff coverage is 66.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #655      +/-   ##
==========================================
- Coverage   83.58%   83.56%   -0.02%     
==========================================
  Files          28       28              
  Lines        4172     4174       +2     
==========================================
+ Hits         3487     3488       +1     
- Misses        685      686       +1     

@radez
Copy link
Author

radez commented Apr 2, 2024

Hm, test results suggest maybe I'm not making the correct check here to resolve this.
I'll do some more research to see if I can clarify.

@radez radez force-pushed the ssl3_test_error_handling branch 2 times, most recently from bd4112f to 081043d Compare April 2, 2024 16:28
@webknjaz
Copy link
Member

webknjaz commented Apr 2, 2024

Any ideas on how to test both variants in CI?

@radez
Copy link
Author

radez commented Apr 2, 2024

Any ideas on how to test both variants in CI?

I believe this was a change in openssl 3.2.
You can see in fedora where F40 and rawhide are 3.2 and are the builds that are failing.
https://packages.fedoraproject.org/pkgs/openssl/openssl/
I've update the patch to check for openssl 3.2 and I believe this has resolved testing for the correct variants in the correct cases.

@webknjaz
Copy link
Member

webknjaz commented Apr 2, 2024

Perhaps, it's time to integrate Packit..

@radez
Copy link
Author

radez commented Apr 2, 2024

Yup, probably not a bad idea.

Using OpenSSL 3, the expected error string caught in ssl tests has changed.
E       AssertionError: assert 'wrong version number' in
                                 '[SSL] record layer failure (_ssl.c:1000)'

This is already handled for OpenSSL pre-1.1 and gte-1.1, adding handling
for OpenSSL 3+

Fixes: cherrypy#645
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing test with openssl 3.2.0 (test_https_over_http_error)
2 participants