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
4531ec74
Commit
4531ec74
authored
Jun 11, 2018
by
Ned Deily
Committed by
GitHub
Jun 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-31432: Revert unrelated code changes to _ssl.c and test_ssl (GH-7650)
parent
ef24b6c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
Lib/test/test_ssl.py
Lib/test/test_ssl.py
+1
-3
Modules/_ssl.c
Modules/_ssl.c
+2
-2
No files found.
Lib/test/test_ssl.py
View file @
4531ec74
...
@@ -4074,9 +4074,7 @@ class ThreadedTests(unittest.TestCase):
...
@@ -4074,9 +4074,7 @@ class ThreadedTests(unittest.TestCase):
self
.
assertTrue
(
session
)
self
.
assertTrue
(
session
)
with
self
.
assertRaises
(
TypeError
)
as
e
:
with
self
.
assertRaises
(
TypeError
)
as
e
:
s
.
session
=
object
s
.
session
=
object
self
.
assertEqual
(
self
.
assertEqual
(
str
(
e
.
exception
),
'Value is not a SSLSession.'
)
str
(
e
.
exception
),
'Value is not an SSLSession.'
)
with
client_context
.
wrap_socket
(
socket
.
socket
(),
with
client_context
.
wrap_socket
(
socket
.
socket
(),
server_hostname
=
hostname
)
as
s
:
server_hostname
=
hostname
)
as
s
:
...
...
Modules/_ssl.c
View file @
4531ec74
...
@@ -2066,7 +2066,7 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value,
...
@@ -2066,7 +2066,7 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value,
SSL_set_SSL_CTX
(
self
->
ssl
,
self
->
ctx
->
ctx
);
SSL_set_SSL_CTX
(
self
->
ssl
,
self
->
ctx
->
ctx
);
#endif
#endif
}
else
{
}
else
{
PyErr_SetString
(
PyExc_TypeError
,
"The value must be a
n SSLContext.
"
);
PyErr_SetString
(
PyExc_TypeError
,
"The value must be a
SSLContext
"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -2725,7 +2725,7 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value,
...
@@ -2725,7 +2725,7 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value,
int
result
;
int
result
;
if
(
!
PySSLSession_Check
(
value
))
{
if
(
!
PySSLSession_Check
(
value
))
{
PyErr_SetString
(
PyExc_TypeError
,
"Value is not a
n
SSLSession."
);
PyErr_SetString
(
PyExc_TypeError
,
"Value is not a SSLSession."
);
return
-
1
;
return
-
1
;
}
}
pysess
=
(
PySSLSession
*
)
value
;
pysess
=
(
PySSLSession
*
)
value
;
...
...
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