File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ Core and Builtins
186186Library
187187-------
188188
189+ - Issue #25939: On Windows open the cert store readonly in ssl.enum_certificates.
190+
189191- Issue #25995: os.walk() no longer uses FDs proportional to the tree depth.
190192
191193- Issue #25994: Added the close() method and the support of the context manager
Original file line number Diff line number Diff line change @@ -4198,7 +4198,9 @@ _ssl_enum_certificates_impl(PyModuleDef *module, const char *store_name)
41984198 if (result == NULL ) {
41994199 return NULL ;
42004200 }
4201- hStore = CertOpenSystemStore ((HCRYPTPROV )NULL , store_name );
4201+ hStore = CertOpenStore (CERT_STORE_PROV_SYSTEM_A , 0 , (HCRYPTPROV )NULL ,
4202+ CERT_STORE_READONLY_FLAG | CERT_SYSTEM_STORE_LOCAL_MACHINE ,
4203+ store_name );
42024204 if (hStore == NULL ) {
42034205 Py_DECREF (result );
42044206 return PyErr_SetFromWindowsErr (GetLastError ());
@@ -4284,7 +4286,9 @@ _ssl_enum_crls_impl(PyModuleDef *module, const char *store_name)
42844286 if (result == NULL ) {
42854287 return NULL ;
42864288 }
4287- hStore = CertOpenSystemStore ((HCRYPTPROV )NULL , store_name );
4289+ hStore = CertOpenStore (CERT_STORE_PROV_SYSTEM_A , 0 , (HCRYPTPROV )NULL ,
4290+ CERT_STORE_READONLY_FLAG | CERT_SYSTEM_STORE_LOCAL_MACHINE ,
4291+ store_name );
42884292 if (hStore == NULL ) {
42894293 Py_DECREF (result );
42904294 return PyErr_SetFromWindowsErr (GetLastError ());
You can’t perform that action at this time.
0 commit comments