GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-44888: Add ssl.OP_LEGACY_SERVER_CONNECT by xtkoba · Pull Request #27776 · python/cpython

Conversation

@xtkoba

@xtkoba xtkoba commented Aug 16, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Required for making OpenSSL 3.0.0 behave like 1.1.1.

https://bugs.python.org/issue44888

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@xtkoba
Add ssl.OP_LEGACY_SERVER_CONNECT
3e14217
Required for making OpenSSL 3.0.0 behave like 1.1.1.
@the-knights-who-say-ni

the-knights-who-say-ni commented Aug 16, 2021

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@xtkoba

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Aug 16, 2021
@bedevere-bot bedevere-bot added the awaiting review label Aug 16, 2021
@xtkoba

xtkoba commented Aug 16, 2021

Copy link
Copy Markdown
Author

See also openssl/openssl#16278

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv

ambv commented Aug 17, 2021

Copy link
Copy Markdown
Contributor

Please add a NEWS entry.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv
ambv requested a review from tiran August 17, 2021 12:51
@tiran

tiran commented Aug 17, 2021

Copy link
Copy Markdown
Member

Please also add documentation update and a test case.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

xtkoba added 3 commits August 18, 2021 14:28
@xtkoba
NEWS entry
3170625
@xtkoba
Documentation
f07c086
@xtkoba
Test case
4cb5f3d
tiran
tiran suggested changes Aug 18, 2021
View reviewed changes
Comment thread Doc/library/ssl.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_ssl.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Aug 18, 2021

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting review labels Aug 18, 2021
xtkoba added 3 commits August 18, 2021 22:14
@xtkoba
Doc: availability
832e67b
@xtkoba
Test case: availability
5891371
@xtkoba
Test case: connection
dc22a8c
@xtkoba

xtkoba commented Aug 18, 2021

Copy link
Copy Markdown
Author

I have made the requested changes; please review again.

Note that the connection test would really require an "unpatched" server, which I didn't come up with how to prepare.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Aug 18, 2021
@bedevere-bot

bedevere-bot commented Aug 18, 2021

Copy link
Copy Markdown

Thanks for making the requested changes!

@tiran: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from tiran August 18, 2021 16:14
@xtkoba xtkoba closed this Sep 15, 2021
@jerrychong25

jerrychong25 commented Feb 4, 2022

Copy link
Copy Markdown

Hi @xtkoba , just checking is this ssl.OP_LEGACY_SERVER_CONNECT issue already fixed in Python OpenSSL 3.0.0 side?

Source of Issue: https://bugs.python.org/issue44888

I've tried with configure with ssl.OP_LEGACY_SERVER_CONNECT in OpenSSL 3.0.0, but can't found this option as per error messages below:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_182/1739907879.py in <module>
     37 hostname = '[www.python.org](https://www.python.org/)'
     38 context = ssl.create_default_context()
---> 39 context.options &= ~ssl.OP_LEGACY_SERVER_CONNECT
     40 
     41 with socket.create_connection((hostname, 443)) as sock:

AttributeError: module 'ssl' has no attribute 'OP_LEGACY_SERVER_CONNECT'

Checked also in Python OpenSSL 3.0.0 documentation (Link: https://docs.python.org/3/library/ssl.html), also can't found this option.

In this situation, what is best workaround solution for making OpenSSL 3.0.0 behave like 1.1.1 due to unable configure ssl.OP_LEGACY_SERVER_CONNECT as of now?

Thanks.

CC: @tiran

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran

tiran commented Feb 4, 2022

Copy link
Copy Markdown
Member

The changeset has not been merged and the flag is not available. @xtkoba closed the PR.

jerrychong25 and graingert reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hjmallon

hjmallon commented Mar 28, 2022

Copy link
Copy Markdown

Note to self/others, I was able to work around by manually setting the numeric value.

ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
ctx.options |= 0x4
zhangyoufu, tvuotila, and ap-- reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DimitriPapadopoulos DimitriPapadopoulos mentioned this pull request May 5, 2022
Ubuntu 22.04 SSL isssue dlenski/gp-saml-gui#42
Open
@xtkoba xtkoba mannequin mentioned this pull request Aug 3, 2022
ssl.OP_LEGACY_SERVER_CONNECT missing #89051
Closed
@Dilski Dilski mentioned this pull request Mar 6, 2023
UNSAFE_LEGACY_RENEGOTIATION_DISABLED error in newer versions of Python pschmitt/roombapy#175
Closed
@berkorbay berkorbay mentioned this pull request Aug 9, 2023
UNSAFE_LEGACY_RENEGOTIATION_DISABLED due to OpenSSL 3.0 mvantellingen/python-zeep#1387
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tiran tiran Awaiting requested review from tiran

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting change review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@xtkoba @the-knights-who-say-ni @ambv @tiran @bedevere-bot @jerrychong25 @hjmallon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.