On Sat, 13 Jan 2018 13:54:33 +0100
Christian Heimes <chri...@python.org> wrote:
>
> If we agree to drop support for OpenSSL 0.9.8 and 1.0.1, then I can land
> bunch of useful goodies like proper hostname verification [2], proper
> fix for IP address in SNI TLS header [3], PEP 543 compatible Certificate
> and PrivateKey types (support loading certs and keys from file and
> memory) [4], and simplified cipher suite configuration [5]. I can
> finally clean up _ssl.c during the beta phase, too.
Given the annoyance of supporting old OpenSSL versions, I'd say +1 to
this.
We'll have to deal with the complaints of users of Debian oldstable,
CentOS 6 and RHEL 6, though.
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
Pytho...@python.org
https://mail.python.org/mailman/listinfo/python-dev
On Sat, Jan 13, 2018 at 02:23:19PM +0100, Antoine Pitrou wrote:
> On Sat, 13 Jan 2018 13:54:33 +0100
> Christian Heimes <chri...@python.org> wrote:
> >
> > If we agree to drop support for OpenSSL 0.9.8 and 1.0.1, then I can land
> > bunch of useful goodies like proper hostname verification [2], proper
> > fix for IP address in SNI TLS header [3], PEP 543 compatible Certificate
> > and PrivateKey types (support loading certs and keys from file and
> > memory) [4], and simplified cipher suite configuration [5]. I can
> > finally clean up _ssl.c during the beta phase, too.
>
> Given the annoyance of supporting old OpenSSL versions, I'd say +1 to
> this.
>
> We'll have to deal with the complaints of users of Debian oldstable,
> CentOS 6 and RHEL 6, though.
It will probably be more work for Christian, but is it reasonable to
keep support for the older versions of OpenSSL, but make the useful
goodies conditional on a newer version?
On 2018-01-13 21:02, Brett Cannon wrote:
> +1 from me as well for the improved security.
Thanks, Brett!
How should we handle CPython's Travis CI tests? The 14.04 boxes have
OpenSSL 1.0.1. To the best of my knowledge, Travis doesn't offer 16.04.
We could either move to container-based testing with a 16.04 container,
which would give us 1.0.2 Or we could compile our own copy of OpenSSL
with my multissl builder and use some rpath magic.
In order to test all new features, Ubuntu doesn't cut it. Even current
snapshot of Ubuntu doesn't contain OpenSSL 1.1. Debian Stretch or Fedora
would do the trick, though.
Maybe Barry's work on official test container could leveraged testing?
Regards,
Christian
> I'm not going to add OpenSSL sources or builds to CPython. We just got
> rid of copies of libffi and other 3rd party dependencies. Crypto and TLS
> libraries are much, MUCH more complicated to handle than libffi. It's a
> constant moving targets of attacks. Vendors and distributions also have
> different opinions about trust store and policies.
>
> Let's keep build dependencies a downstream and vendor problem.
That's not always an option, unfortunately.
--
Ned Deily
n...@python.org -- []
_______________________________________________
Python-Dev mailing list
Pytho...@python.org
https://mail.python.org/mailman/listinfo/python-dev
From my perspective, we can’t keep an OpenSSL-like API and use Windows platform libraries (we could do a requests-like API easily enough, but even urllib3 is painfully low-level).
We have to continue shipping our own copy of OpenSSL on Windows. Nothing to negotiate here except whether OpenSSL releases should trigger a Python release, and I think that decision can stay with the RM.
Good luck solving macOS :o)
Cheers,
Steve
Top-posted from my Windows phone
3.7 will no longer use static linking. We can offer out-of-bounds
updates of the OpenSSL DLLs. And by "we", I'm talking about you. :)
Christian
From my perspective, we can’t keep an OpenSSL-like API and use Windows platform libraries (we could do a requests-like API easily enough, but even urllib3 is painfully low-level).
We have to continue shipping our own copy of OpenSSL on Windows. Nothing to negotiate here except whether OpenSSL releases should trigger a Python release, and I think that decision can stay with the RM.
Good luck solving macOS :o)
Cheers,
Steve
Top-posted from my Windows phone
From: Stephen J. Turnbull
Sent: Tuesday, January 16, 2018 17:45
To: Matt Billenstein
Cc: Christian Heimes; pytho...@python.org
Subject: Re: [Python-Dev] Python 3.7: Require OpenSSL >=1.0.2 / LibreSSL >=2.5.3
Matt Billenstein writes:
> In my mind it becomes easier to bundle deps in a binary installer
> across the board (Linux, OSX, Windows) rather than rely on whatever
> version the operating system provides.
Thing is, as Christian points out, TLS is a rapidly moving target.
Every Mac OS or iOS update seems to link to a dozen CVEs for TLS
support. We can go there if we have to, but it's often hard to go
back when vendor support catches up to something reasonable. I think
this is something for Ned and Christian and Steve to negotiate, since
they're the ones who are most aware of the tradeoffs and bear the
costs.
_______________________________________________
You are misunderstanding the goal of PEP 543. It's not about providing
implementations of various backends. The PEP merely defines an minimal
abstraction layer. Neither the PEP nor the API are finalized or complete
yet, too Some parts of the PEP must be changed before it can be
finalized. Cory and I are discussion the matter.
Python 3.7's ssl module won't be compatible with PEP 543. For 3.8 it
*might* be possible to provide a 543 compatible implementation on top of
the ssl module.
I will not work on SChannel or SecureTransport, since I have neither
expertise, knowledge, interest or resources to work on other
implementations. AFAIK Steve would rather plug in Windows' cert
validation API into OpenSSL than to provide another TLS implementation.
For Apple ... no clue. How about you contact Apple support?
Regards,
Christian
_______________________________________________
Python-Dev mailing list
Pytho...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/dev-python%2Bgarchive-30976%40googlegroups.com
On 2018-01-16 12:28, Wes Turner wrote:
>
>
> On Tuesday, January 16, 2018, Steve Dower <steve...@python.org
> <mailto:steve...@python.org>> wrote:
>
> From my perspective, we can’t keep an OpenSSL-like API and use
> Windows platform libraries (we *could* do a requests-like API easily
> enough, but even urllib3 is painfully low-level).____
>
> Support for Windows SChannel and Apple SecureTransport is part of the
> TLS module.
>
> IDK how far along that work is (whether it'll be ready for 3.7 beta 1)?
> Or where those volunteering to help with the TLS module can send PRs?
You are misunderstanding the goal of PEP 543. It's not about providing
implementations of various backends. The PEP merely defines an minimal
abstraction layer. Neither the PEP nor the API are finalized or complete
yet, too Some parts of the PEP must be changed before it can be
finalized. Cory and I are discussion the matter.
Python 3.7's ssl module won't be compatible with PEP 543. For 3.8 it
*might* be possible to provide a 543 compatible implementation on top of
the ssl module.
I will not work on SChannel or SecureTransport, since I have neither
expertise, knowledge, interest or resources to work on other
implementations. AFAIK Steve would rather plug in Windows' cert
validation API into OpenSSL than to provide another TLS implementation.
For Apple ... no clue. How about you contact Apple support?
Regards,
Christian
_______________________________________________
Python-Dev mailing list
Pytho...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com
Honestly, I’d rather plug into the WinHTTP API and just not even bother with sockets :)
Certificate validation is about the only thing broken in OpenSSL on Windows (as far as not working well with system config), and it’s relatively easy to replace with a couple of API calls. Now that we don’t statically link OpenSSL anymore, it can be done easily with ctypes, so I’ll probably put out a package for it sometime soon.
Top-posted from my Windows phone
From: Christian Heimes
Sent: Tuesday, January 16, 2018 22:52
To: pytho...@python.org
Subject: Re: [Python-Dev] Python 3.7: Require OpenSSL >=1.0.2 / LibreSSL >=2.5.3
On 2018-01-16 12:28, Wes Turner wrote:
I think you mean out-of-band updates, and by “you” I'm going to pretend you mean PyCA ;)
Top-posted from my Windows phone
From: Christian Heimes
Sent: Tuesday, January 16, 2018 21:42
To: pytho...@python.org
Subject: Re: [Python-Dev] Python 3.7: Require OpenSSL >=1.0.2 / LibreSSL>=2.5.3
On 2018-01-16 08:08, Steve Dower wrote:
Err, yes :)
Unsubscribe: https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com
Unsubscribe: https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com
On 2018-01-16 21:17, Christian Heimes wrote:
We have two options until LibreSSL has addressed the issue:
1) Make the SSL module more secure, simpler and standard conform
2) Support LibreSSL
I started a vote on Twitter [4]. So far most people prefer security.
Christian
[1] https://bugs.python.org/issue31399
[2] https://github.com/pyca/cryptography/issues/3247
[3] https://github.com/libressl-portable/portable/issues/381
[4] https://twitter.com/reaperhulk/status/953991843565490176
_______________________________________________
Python-Dev mailing list
Pytho...@python.org
https://mail.python.org/mailman/listinfo/python-dev
It's more venting than voting :)
_______________________________________________
Python-Dev mailing list
Pytho...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/dev-python%2Bgarchive-30976%40googlegroups.com
On 2018-01-16 21:17, Christian Heimes wrote:
> FYI, master on Travis CI now builds and uses OpenSSL 1.1.0g [1]. I have
> created a daily cronjob to populate Travis' cache with OpenSSL builds.
> Until the cache is filled, Linux CI will take an extra 5 minute.
I have messed up my initial research. :( When I was checking LibreSSL
and OpenSSL for features, I draw a wrong conclusion. LibreSSL is *not*
OpenSSL 1.0.2 compatible. It only implements some of the required
features from 1.0.2 (e.g. X509_check_hostname) but not
X509_VERIFY_PARAM_set1_host.
X509_VERIFY_PARAM_set1_host() is required to perform hostname
verification during the TLS handshake. Without the function, I'm unable
to fix Python's hostname matching code [1]. LibreSSL upstream knows
about the issue since 2016 [2]. I have opened another bug report [3].
We have two options until LibreSSL has addressed the issue:
1) Make the SSL module more secure, simpler and standard conform
2) Support LibreSSL
On Jan 18, 2018 07:34, "Christian Heimes" <chri...@python.org> wrote:On 2018-01-16 21:17, Christian Heimes wrote:
> FYI, master on Travis CI now builds and uses OpenSSL 1.1.0g [1]. I have
> created a daily cronjob to populate Travis' cache with OpenSSL builds.
> Until the cache is filled, Linux CI will take an extra 5 minute.
I have messed up my initial research. :( When I was checking LibreSSL
and OpenSSL for features, I draw a wrong conclusion. LibreSSL is *not*
OpenSSL 1.0.2 compatible. It only implements some of the required
features from 1.0.2 (e.g. X509_check_hostname) but not
X509_VERIFY_PARAM_set1_host.
X509_VERIFY_PARAM_set1_host() is required to perform hostname
verification during the TLS handshake. Without the function, I'm unable
to fix Python's hostname matching code [1]. LibreSSL upstream knows
about the issue since 2016 [2]. I have opened another bug report [3].
We have two options until LibreSSL has addressed the issue:
1) Make the SSL module more secure, simpler and standard conform
2) Support LibreSSL
[...]
We have *very* few people qualified to maintain the ssl module, so given the new landscape I think we should focus on keeping our core OpenSSL support solid and not worry about LibreSSL. If LibreSSL wants to be supported as well then – like any other 2nd tier platform – they need to find someone to do the work. And if people are worried about supporting more diversity in SSL implementations, then PEP 543 is probably the thing to focus on.
Thanks!
I'd prefer to support LibreSSL, too. Paul Kehrer from PyCA summed up the
issue with LibreSSL nicely:
> It was marketed as an API compatible drop-in replacement and it is
failing in that capacity. Additionally, it is missing features needed to
improve the security and ease the maintenance burden of CPython’s dev team.
Since I haven given up on LibreSSL, I spent some time and implemented
some autoconf magic in https://github.com/python/cpython/pull/5242. It
checks for the presence of libssl and X509_VERIFY_PARAM_set1_host()
function family:
...
checking whether compiling and linking against OpenSSL works... yes
checking for X509_VERIFY_PARAM_set1_host in libssl... yes
...
The ssl module will regain compatibility with LibreSSL as soon as a new
release provides the necessary functions.
Christian
No core developer has vetoed against my proposal. I also spoke to
several members of Python Cryptographic Authority and Python Packaging
Authority. They are all in favor of my proposal, too.
There I have decided to move forward and require OpenSSL 1.0.2 API. This
means Python 3.7 temporarily suspends support for LibreSSL until
https://github.com/libressl-portable/portable/issues/381 is resolved. I
have appended a lengthy explanation to my LibreSSL ticket, too.
I also informed LibreSSL developers that Python 3.8 will most likely
require an OpenSSL 1.1 compatible API. With OpenSSL 1.0.2 support, I can
drop a considerable amount of legacy code, e.g. custom thread locking,
initialization and a bunch of shim functions.
Regards,