20 #include <winpr/config.h>
22 #include <winpr/crypto.h>
151 #include <winpr/crt.h>
152 #include <winpr/wincrypt.h>
158 HCERTSTORE CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingType,
159 HCRYPTPROV_LEGACY hCryptProv, DWORD dwFlags,
const void* pvPara)
167 certstore->lpszStoreProvider = lpszStoreProvider;
168 certstore->dwMsgAndCertEncodingType = dwMsgAndCertEncodingType;
171 return (HCERTSTORE)certstore;
174 HCERTSTORE CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv, LPCWSTR szSubsystemProtocol)
176 HCERTSTORE hCertStore = NULL;
178 hCertStore = CertOpenStore(CERT_STORE_PROV_FILE, X509_ASN_ENCODING, hProv, 0, NULL);
183 HCERTSTORE CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv, LPCSTR szSubsystemProtocol)
185 return CertOpenSystemStoreW(hProv, NULL);
188 BOOL CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
199 PCCERT_CONTEXT CertFindCertificateInStore(HCERTSTORE hCertStore, DWORD dwCertEncodingType,
200 DWORD dwFindFlags, DWORD dwFindType,
211 DWORD CertGetNameStringW(
PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags,
void* pvTypePara,
212 LPWSTR pszNameString, DWORD cchNameString)
217 DWORD CertGetNameStringA(
PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags,
void* pvTypePara,
218 LPSTR pszNameString, DWORD cchNameString)