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
547ab5f7
Commit
547ab5f7
authored
Feb 17, 2016
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open the cert store readonly
Patch from Chi Hsuan Yen.
parent
02246381
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_ssl.c
Modules/_ssl.c
+6
-2
No files found.
Misc/NEWS
View file @
547ab5f7
...
...
@@ -16,6 +16,8 @@ Core and Builtins
Library
-------
- Issue #25939: On Windows open the cert store readonly in ssl.enum_certificates.
- Issue #22570: Add '
path
' attribute to pathlib.Path objects,
returning the same as str(), to make it more similar to DirEntry.
Library code can now write getattr(p, '
path
', p) to get the path as
...
...
Modules/_ssl.c
View file @
547ab5f7
...
...
@@ -3597,7 +3597,9 @@ PySSL_enum_certificates(PyObject *self, PyObject *args, PyObject *kwds)
if
(
result
==
NULL
)
{
return
NULL
;
}
hStore
=
CertOpenSystemStore
((
HCRYPTPROV
)
NULL
,
store_name
);
hStore
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_A
,
0
,
(
HCRYPTPROV
)
NULL
,
CERT_STORE_READONLY_FLAG
|
CERT_SYSTEM_STORE_LOCAL_MACHINE
,
store_name
);
if
(
hStore
==
NULL
)
{
Py_DECREF
(
result
);
return
PyErr_SetFromWindowsErr
(
GetLastError
());
...
...
@@ -3685,7 +3687,9 @@ PySSL_enum_crls(PyObject *self, PyObject *args, PyObject *kwds)
if
(
result
==
NULL
)
{
return
NULL
;
}
hStore
=
CertOpenSystemStore
((
HCRYPTPROV
)
NULL
,
store_name
);
hStore
=
CertOpenStore
(
CERT_STORE_PROV_SYSTEM_A
,
0
,
(
HCRYPTPROV
)
NULL
,
CERT_STORE_READONLY_FLAG
|
CERT_SYSTEM_STORE_LOCAL_MACHINE
,
store_name
);
if
(
hStore
==
NULL
)
{
Py_DECREF
(
result
);
return
PyErr_SetFromWindowsErr
(
GetLastError
());
...
...
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