2
//-------------------------------------------------------------------------------------------------
3
// <copyright file="certutil.h" company="Microsoft">
4
// Copyright (c) Microsoft Corporation. All rights reserved.
6
// The use and distribution terms for this software are covered by the
7
// Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php)
8
// which can be found in the file CPL.TXT at the root of this distribution.
9
// By using this software in any fashion, you are agreeing to be bound by
10
// the terms of this license.
12
// You must not remove this notice, or any other, from this software.
16
// Certificate helper functions.
18
//-------------------------------------------------------------------------------------------------
24
HRESULT DAPI CertReadProperty(
25
__in PCCERT_CONTEXT pCertContext,
26
__in DWORD dwProperty,
27
__deref_out_bound LPVOID pvValue
30
HRESULT DAPI GetCryptProvFromCert(
32
__in PCCERT_CONTEXT pCert,
33
__out HCRYPTPROV *phCryptProv,
34
__out DWORD *pdwKeySpec,
35
__in BOOL *pfDidCryptAcquire,
36
__deref_opt_out LPWSTR *ppwszTmpContainer,
37
__deref_opt_out LPWSTR *ppwszProviderName,
38
__out DWORD *pdwProviderType
41
HRESULT DAPI FreeCryptProvFromCert(
43
__in HCRYPTPROV hProv,
44
__in_opt LPWSTR pwszCapiProvider,
45
__in DWORD dwProviderType,
46
__in_opt LPWSTR pwszTmpContainer
49
HRESULT DAPI GetProvSecurityDesc(
50
__in HCRYPTPROV hProv,
51
__deref_out SECURITY_DESCRIPTOR** pSecurity
54
HRESULT DAPI SetProvSecurityDesc(
55
__in HCRYPTPROV hProv,
56
__in SECURITY_DESCRIPTOR* pSecurity
59
BOOL DAPI CertHasPrivateKey(
60
__in PCCERT_CONTEXT pCertContext,
61
__out_opt DWORD* pdwKeySpec
64
HRESULT DAPI CertInstallSingleCertificate(
65
__in HCERTSTORE hStore,
66
__in PCCERT_CONTEXT pCertContext,