Bug 1553834
| Summary: | [RFE] enable ssl python 3.6 | ||
|---|---|---|---|
| Product: | Red Hat Software Collections | Reporter: | Steven Walter <stwalter> |
| Component: | rh-python36-container | Assignee: | Tomas Orsava <torsava> |
| Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
| Severity: | medium | Docs Contact: | Lenka Špačková <lkuprova> |
| Priority: | unspecified | ||
| Version: | rh-python36 | CC: | aos-bugs, bparees, cheimes, jokerman, kwalker, mmccomas, rwicker, torsava |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-11 15:27:17 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Steven Walter
2018-03-09 16:24:26 UTC
The correct way to test for ssl support is "import ssl". socket.ssl was an undocumented, deprecated feature of Python 2 that is no longer available in Python 3. It was never officially supported by upstream. Fun fact: I'm the upstream owner and maintainer of the ssl module. Until now I wasn't aware that Python 2.7 had socket.ssl. The feature is neither tested nor documented. Update: socket.ssl is no longer documentd and supported since Python 2.6.0. It was removed from py3k (later Python 3.0) in 2007. Hi Steven, SSL is enabled in our Python images. The problem is that the `socket.ssl()` function has been deprecated since Python 2.6 and removed in Python 3. It is replaced by the `ssl.wrapsocket()` function that works on all our Python images: Python 2.7: $ python Python 2.7.13 (default, Feb 8 2017, 06:57:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ssl >>> hasattr(ssl, "wrap_socket") True Python 3.6 $ python Python 3.6.3 (default, Jan 9 2018, 10:19:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ssl >>> hasattr(ssl, "wrap_socket") True I'm closing this as NOTABUG, but feel free to reopen if needed. Also: Don't use ssl.wrap_socket(). It's bad, slow, and insecure. |