Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1867f244
Commit
1867f244
authored
Jun 14, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always unwrap _socketobj in socket.ssl. Revert httplib.py 1.25.
Fixes #754447.
parent
bc122625
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
Lib/httplib.py
Lib/httplib.py
+1
-4
Lib/socket.py
Lib/socket.py
+6
-10
No files found.
Lib/httplib.py
View file @
1867f244
...
...
@@ -956,10 +956,7 @@ class HTTPSConnection(HTTPConnection):
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
sock
.
connect
((
self
.
host
,
self
.
port
))
realsock
=
sock
if
hasattr
(
sock
,
"_sock"
):
realsock
=
sock
.
_sock
ssl
=
socket
.
ssl
(
realsock
,
self
.
key_file
,
self
.
cert_file
)
ssl
=
socket
.
ssl
(
sock
,
self
.
key_file
,
self
.
cert_file
)
self
.
sock
=
FakeSocket
(
sock
,
ssl
)
...
...
Lib/socket.py
View file @
1867f244
...
...
@@ -65,16 +65,12 @@ if _have_ssl:
__all__
.
extend
(
os
.
_get_exports_list
(
_ssl
))
_realsocket
=
socket
if
(
sys
.
platform
.
lower
().
startswith
(
"win"
)
or
(
hasattr
(
os
,
'uname'
)
and
os
.
uname
()[
0
]
==
"BeOS"
)
or
sys
.
platform
==
"riscos"
):
if
_have_ssl
:
_realssl
=
ssl
def
ssl
(
sock
,
keyfile
=
None
,
certfile
=
None
):
if
hasattr
(
sock
,
"_sock"
):
sock
=
sock
.
_sock
return
_realssl
(
sock
,
keyfile
,
certfile
)
if
_have_ssl
:
_realssl
=
ssl
def
ssl
(
sock
,
keyfile
=
None
,
certfile
=
None
):
if
hasattr
(
sock
,
"_sock"
):
sock
=
sock
.
_sock
return
_realssl
(
sock
,
keyfile
,
certfile
)
# WSA error codes
if
sys
.
platform
.
lower
().
startswith
(
"win"
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment