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
f5b37602
Commit
f5b37602
authored
Mar 04, 2015
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable X509_V_FLAG_TRUSTED_FIRST when possible (closes #23476)
parent
c4c79830
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_ssl.c
Modules/_ssl.c
+9
-0
No files found.
Misc/NEWS
View file @
f5b37602
...
...
@@ -18,6 +18,9 @@ Core and Builtins
Library
-------
- Issue #23476: In the ssl module, enable OpenSSL'
s
X509_V_FLAG_TRUSTED_FIRST
flag
on
certificate
stores
when
it
is
available
.
-
Issue
#
23576
:
Avoid
stalling
in
SSL
reads
when
EOF
has
been
reached
in
the
SSL
layer
but
the
underlying
connection
hasn
't been closed.
...
...
Modules/_ssl.c
View file @
f5b37602
...
...
@@ -2072,6 +2072,15 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
sizeof
(
SID_CTX
));
#undef SID_CTX
#ifdef X509_V_FLAG_TRUSTED_FIRST
{
/* Improve trust chain building when cross-signed intermediate
certificates are present. See https://bugs.python.org/issue23476. */
X509_STORE
*
store
=
SSL_CTX_get_cert_store
(
self
->
ctx
);
X509_STORE_set_flags
(
store
,
X509_V_FLAG_TRUSTED_FIRST
);
}
#endif
return
(
PyObject
*
)
self
;
}
...
...
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