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
90c9b40c
Commit
90c9b40c
authored
May 26, 2016
by
Steve Dower
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #27114: Fix SSLContext._load_windows_store_certs fails with PermissionError
parent
b1d867f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
Lib/ssl.py
Lib/ssl.py
+9
-5
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/ssl.py
View file @
90c9b40c
...
...
@@ -141,6 +141,7 @@ from socket import socket, AF_INET, SOCK_STREAM, create_connection
from
socket
import
SOL_SOCKET
,
SO_TYPE
import
base64
# for DER-to-PEM translation
import
errno
import
warnings
if
_ssl
.
HAS_TLS_UNIQUE
:
CHANNEL_BINDING_TYPES
=
[
'tls-unique'
]
...
...
@@ -375,11 +376,14 @@ class SSLContext(_SSLContext):
def _load_windows_store_certs(self, storename, purpose):
certs = bytearray()
for cert, encoding, trust in enum_certificates(storename):
# CA certs are never PKCS#7 encoded
if encoding == "x509_asn":
if trust is True or purpose.oid in trust:
certs.extend(cert)
try:
for cert, encoding, trust in enum_certificates(storename):
# CA certs are never PKCS#7 encoded
if encoding == "x509_asn":
if trust is True or purpose.oid in trust:
certs.extend(cert)
except OSError:
warnings.warn("unable to enumerate Windows certificate store")
if certs:
self.load_verify_locations(cadata=certs)
return certs
...
...
Misc/NEWS
View file @
90c9b40c
...
...
@@ -83,6 +83,9 @@ Core and Builtins
Library
-------
-
Issue
#
27114
:
Fix
SSLContext
.
_load_windows_store_certs
fails
with
PermissionError
-
Issue
#
14132
:
Fix
urllib
.
request
redirect
handling
when
the
target
only
has
a
query
string
.
Fix
by
J
á
n
Janech
.
...
...
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