X Tutup
The Wayback Machine - https://web.archive.org/web/20221201094245/https://github.com/python/cpython/issues/99079
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

Use OpenSSL 3.0 in our binary builds #99079

Open
gpshead opened this issue Nov 3, 2022 · 5 comments
Open

Use OpenSSL 3.0 in our binary builds #99079

gpshead opened this issue Nov 3, 2022 · 5 comments
Labels
3.12 deferred-blocker type-feature A feature request or enhancement

Comments

@gpshead
Copy link
Member

gpshead commented Nov 3, 2022

Feature or enhancement

We currently use OpenSSL 1.1.1 series in our Windows and macOS binary builds.

Per https://www.openssl.org/source/, that is only supported through September of 2023.

Thus we need to switch to a supported version of OpenSSL before 3.12 is released. (And likely consider moving 3.11 to use it if deemed feasible)

There are a pile of bugs related to OpenSSL 3 that may or may not be blockers:

We have a longer term desire to not be so beholden to OpenSSL at all. But this issue is being filed as a practical response to untangling that not being likely feasible before 3.12beta1.

@gpshead gpshead added type-feature A feature request or enhancement deferred-blocker 3.12 labels Nov 3, 2022
@corona10
Copy link
Member

corona10 commented Nov 6, 2022

@gpshead Out of curiosity, Did we have any discussion about using boringSSL by vendoring them to the CPython repo?

@gpshead
Copy link
Member Author

gpshead commented Nov 11, 2022

Did we have any discussion about using boringSSL by vendoring them to the CPython repo?

I'm not sure how well that would work out. boringSSL isn't really intended to be used by other projects, it doesn't guarantee a stable API. Even for security updates. And it lacks some interfaces and features.

test_ssl.py needs significant modification to "pass" when linked with boringSSL and various pieces of the _ssl extension code need modifications as well as workarounds to disable unsupported features in some places. We carry patches on our Python runtime internally at Google that does some this, but they wouldn't be acceptable as is upstream as they disable features that need to work for global users and skip some tests rather than making them work. If we want to consider official boringSSL support in the CPython repo as well that should get tracked in another issue.

@corona10
Copy link
Member

corona10 commented Nov 11, 2022

it doesn't guarantee a stable AP

Oh, I thought that we can manage the boringSSL as the vendored library likewise libexpat or mimalloc.

We carry patches on our Python runtime internally at Google that does some this, but they wouldn't be acceptable as is upstream as they disable features that need to work for global users and skip some tests rather than making them work

Oh got it..

If we want to consider official boringSSL support in the CPython repo as well that should get tracked in another issue.

Yeah and we also need to write PEP also if we try to do, but we may need to know the possibility of the porting boringSSL into our repository first.

@gpshead
Copy link
Member Author

gpshead commented Nov 11, 2022

it doesn't guarantee a stable AP

Oh, I thought that we can manage the boringSSL as the vendored library likewise libexpat or mimalloc.

We could and would if we did this. It's mostly noteworthy as a risk as it could involve some refactoring larger than we like to do within security fix releases several years down the line in order to pull in other updates.

@h-vetinari
Copy link

h-vetinari commented Nov 29, 2022

Did we have any discussion about using boringSSL by vendoring them to the CPython repo?

Now on DPO!

Moving away from OpenSSL completely has some large maintenance benefits (but IMO even larger downsides too).

Moving to boringSSL sounds like a very bad proposition to my mind. OpenSSL is a heavy dependency, but it goes very far out of its way in terms of stability (which nowadays includes being buildable everywhere1), e.g. it promises:

  • No API or ABI breaking changes are allowed in a minor or patch release.
  • No existing public interface can be modified except where changes are unlikely to break source compatibility [...]
  • No existing public interface can be removed until its replacement has been in place in an LTS stable release. The original interface must also have been documented as deprecated for at least 5 years.

I don't see sufficiently huge issues with OpenSSL (or sufficiently huge improvements with boringSSL) that a switch would look even remotely reasonable from my POV.

Footnotes

  1. not least still being on C89 to support some ultra-exotic platforms without modern compilers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 deferred-blocker type-feature A feature request or enhancement
Projects
Status: No status
Status: Todo
Development

No branches or pull requests

3 participants
X Tutup