diff options
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/certutil.h')
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/inc/certutil.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/certutil.h b/src/libs/dutil/WixToolset.DUtil/inc/certutil.h new file mode 100644 index 00000000..8565c1cf --- /dev/null +++ b/src/libs/dutil/WixToolset.DUtil/inc/certutil.h | |||
@@ -0,0 +1,66 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | #define ReleaseCertStore(p) if (p) { ::CertCloseStore(p, 0); p = NULL; } | ||
6 | #define ReleaseCertContext(p) if (p) { ::CertFreeCertificateContext(p); p = NULL; } | ||
7 | #define ReleaseCertChain(p) if (p) { ::CertFreeCertificateChain(p); p = NULL; } | ||
8 | |||
9 | #ifdef __cplusplus | ||
10 | extern "C" { | ||
11 | #endif | ||
12 | |||
13 | HRESULT DAPI CertReadProperty( | ||
14 | __in PCCERT_CONTEXT pCertContext, | ||
15 | __in DWORD dwProperty, | ||
16 | __out_bcount(*pcbValue) LPVOID pvValue, | ||
17 | __out_opt DWORD* pcbValue | ||
18 | ); | ||
19 | |||
20 | HRESULT DAPI CertGetAuthenticodeSigningTimestamp( | ||
21 | __in CMSG_SIGNER_INFO* pSignerInfo, | ||
22 | __out FILETIME* pft | ||
23 | ); | ||
24 | |||
25 | HRESULT DAPI GetCryptProvFromCert( | ||
26 | __in_opt HWND hwnd, | ||
27 | __in PCCERT_CONTEXT pCert, | ||
28 | __out HCRYPTPROV *phCryptProv, | ||
29 | __out DWORD *pdwKeySpec, | ||
30 | __in BOOL *pfDidCryptAcquire, | ||
31 | __deref_opt_out LPWSTR *ppwszTmpContainer, | ||
32 | __deref_opt_out LPWSTR *ppwszProviderName, | ||
33 | __out DWORD *pdwProviderType | ||
34 | ); | ||
35 | |||
36 | HRESULT DAPI FreeCryptProvFromCert( | ||
37 | __in BOOL fAcquired, | ||
38 | __in HCRYPTPROV hProv, | ||
39 | __in_opt LPWSTR pwszCapiProvider, | ||
40 | __in DWORD dwProviderType, | ||
41 | __in_opt LPWSTR pwszTmpContainer | ||
42 | ); | ||
43 | |||
44 | HRESULT DAPI GetProvSecurityDesc( | ||
45 | __in HCRYPTPROV hProv, | ||
46 | __deref_out SECURITY_DESCRIPTOR** pSecurity | ||
47 | ); | ||
48 | |||
49 | HRESULT DAPI SetProvSecurityDesc( | ||
50 | __in HCRYPTPROV hProv, | ||
51 | __in SECURITY_DESCRIPTOR* pSecurity | ||
52 | ); | ||
53 | |||
54 | BOOL DAPI CertHasPrivateKey( | ||
55 | __in PCCERT_CONTEXT pCertContext, | ||
56 | __out_opt DWORD* pdwKeySpec | ||
57 | ); | ||
58 | |||
59 | HRESULT DAPI CertInstallSingleCertificate( | ||
60 | __in HCERTSTORE hStore, | ||
61 | __in PCCERT_CONTEXT pCertContext, | ||
62 | __in LPCWSTR wzName | ||
63 | ); | ||
64 | #ifdef __cplusplus | ||
65 | } | ||
66 | #endif | ||