diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ssl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index d918671..02971a7 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -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()); |