/** * Worker for cmdDisplayAll. */ static BOOL WINAPI displaySystemStoreLocation(LPCWSTR pwszStoreLocation, DWORD dwFlags, void *pvReserved, void *pvArg) { NOREF(pvReserved); NOREF(pvArg); RTPrintf("System store location: %#010x '%ls'\n", dwFlags, pwszStoreLocation); if (!CertEnumSystemStore(dwFlags, NULL, NULL /*pvArg*/, displaySystemStoreCallback)) RTMsgError("CertEnumSystemStore failed on %#x:'%ls': %s\n", dwFlags, pwszStoreLocation, errorToString(GetLastError())); return TRUE; }
NTSTATUS kuhl_m_crypto_l_stores(int argc, wchar_t * argv[]) { DWORD dwSystemStore, nbStore = 0; PCWCHAR szSystemStore; kull_m_string_args_byName(argc, argv, L"systemstore", &szSystemStore, kuhl_m_crypto_system_stores[0].name); dwSystemStore = kuhl_m_crypto_system_store_to_dword(szSystemStore); kprintf(L"Asking for System Store \'%s\' (0x%08x)\n", szSystemStore, dwSystemStore); if(!CertEnumSystemStore(dwSystemStore, NULL, &nbStore, kuhl_m_crypto_l_stores_enumCallback_print)) PRINT_ERROR_AUTO(L"CertEnumSystemStore"); return STATUS_SUCCESS; }
bool mod_crypto::getVectorSystemStores(vector<wstring> * maSystemStoresvector, DWORD systemStore) { return (CertEnumSystemStore(systemStore, NULL, maSystemStoresvector, enumSysCallback) != 0); }