Changeset 95681 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Jul 17, 2022 6:39:27 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/RTCrStoreCreateSnapshotById-win.cpp
r93115 r95681 57 57 HCERTSTORE hNativeStore = pfnOpenStore(CERT_STORE_PROV_SYSTEM_W, PKCS_7_ASN_ENCODING | X509_ASN_ENCODING, 58 58 NULL /* hCryptProv = default */, fStore | fOpenStore, pwszStoreName); 59 if (h Store)59 if (hNativeStore) 60 60 { 61 61 PCCERT_CONTEXT pCurCtx = NULL; … … 137 137 * Do the work. 138 138 */ 139 DWORD fStore = CERT_SYSTEM_STORE_CURRENT_USER; 139 140 switch (enmStoreId) 140 141 { 142 case RTCRSTOREID_SYSTEM_TRUSTED_CAS_AND_CERTIFICATES: 143 case RTCRSTOREID_SYSTEM_INTERMEDIATE_CAS: 144 fStore = CERT_SYSTEM_STORE_LOCAL_MACHINE; 145 RT_FALL_THRU(); 141 146 case RTCRSTOREID_USER_TRUSTED_CAS_AND_CERTIFICATES: 142 case RTCRSTOREID_ SYSTEM_TRUSTED_CAS_AND_CERTIFICATES:147 case RTCRSTOREID_USER_INTERMEDIATE_CAS: 143 148 { 144 DWORD fStore = enmStoreId == RTCRSTOREID_USER_TRUSTED_CAS_AND_CERTIFICATES 145 ? CERT_SYSTEM_STORE_CURRENT_USER : CERT_SYSTEM_STORE_LOCAL_MACHINE; 146 static PCRTUTF16 const s_apwszStores[] = { L"AuthRoot", L"CA", L"MY", L"Root" }; 147 for (uint32_t i = 0; i < RT_ELEMENTS(s_apwszStores); i++) 148 rc = rtCrStoreAddCertsFromNative(hStore, fStore, s_apwszStores[i], pfnOpenStore, pfnCloseStore, 149 /** @todo CA and MY in s_apwszRootStores are _very_ questionable!!! However, 150 * curl may need them to work correct and it doesn't seem to have any 151 * intermediate ca file. :/ */ 152 static PCRTUTF16 const s_apwszRootStores[] = { L"AuthRoot", L"CA", L"MY", L"Root" }; 153 static PCRTUTF16 const s_apwszIntermediateStores[] = { L"CA", L"MY" }; 154 PCRTUTF16 const *papwszStores = s_apwszRootStores; 155 uint32_t cStores = RT_ELEMENTS(s_apwszRootStores); 156 if (enmStoreId == RTCRSTOREID_USER_INTERMEDIATE_CAS || enmStoreId == RTCRSTOREID_SYSTEM_INTERMEDIATE_CAS) 157 { 158 papwszStores = s_apwszIntermediateStores; 159 cStores = RT_ELEMENTS(s_apwszIntermediateStores); 160 } 161 162 for (uint32_t i = 0; i < cStores; i++) 163 rc = rtCrStoreAddCertsFromNative(hStore, fStore, papwszStores[i], pfnOpenStore, pfnCloseStore, 149 164 pfnEnumCerts, rc, pErrInfo); 150 165 break;
Note:
See TracChangeset
for help on using the changeset viewer.