mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:51:11 +00:00
crypt32: Implement CertAddEncodedCertificateToSystemStoreA/W.
This commit is contained in:
parent
5df2626aae
commit
d8094382a8
|
@ -71,6 +71,44 @@ BOOL WINAPI CertAddEncodedCertificateToStore(HCERTSTORE hCertStore,
|
|||
return ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI CertAddEncodedCertificateToSystemStoreA(LPCSTR pszCertStoreName,
|
||||
const BYTE *pbCertEncoded, DWORD cbCertEncoded)
|
||||
{
|
||||
HCERTSTORE store;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%s, %p, %d)\n", debugstr_a(pszCertStoreName), pbCertEncoded,
|
||||
cbCertEncoded);
|
||||
|
||||
store = CertOpenSystemStoreA(0, pszCertStoreName);
|
||||
if (store)
|
||||
{
|
||||
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
|
||||
pbCertEncoded, cbCertEncoded, CERT_STORE_ADD_USE_EXISTING, NULL);
|
||||
CertCloseStore(store, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI CertAddEncodedCertificateToSystemStoreW(LPCWSTR pszCertStoreName,
|
||||
const BYTE *pbCertEncoded, DWORD cbCertEncoded)
|
||||
{
|
||||
HCERTSTORE store;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
TRACE("(%s, %p, %d)\n", debugstr_w(pszCertStoreName), pbCertEncoded,
|
||||
cbCertEncoded);
|
||||
|
||||
store = CertOpenSystemStoreW(0, pszCertStoreName);
|
||||
if (store)
|
||||
{
|
||||
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
|
||||
pbCertEncoded, cbCertEncoded, CERT_STORE_ADD_USE_EXISTING, NULL);
|
||||
CertCloseStore(store, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
BOOL WINAPI CertAddCertificateLinkToStore(HCERTSTORE hCertStore,
|
||||
PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition,
|
||||
PCCERT_CONTEXT *ppCertContext)
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
@ stdcall CertAddEncodedCRLToStore(ptr long ptr long long ptr)
|
||||
@ stdcall CertAddEncodedCTLToStore(ptr long ptr long long ptr)
|
||||
@ stdcall CertAddEncodedCertificateToStore(ptr long ptr long long ptr)
|
||||
@ stub CertAddEncodedCertificateToSystemStoreA
|
||||
@ stub CertAddEncodedCertificateToSystemStoreW
|
||||
@ stdcall CertAddEncodedCertificateToSystemStoreA(str ptr long)
|
||||
@ stdcall CertAddEncodedCertificateToSystemStoreW(wstr ptr long)
|
||||
@ stdcall CertAddEnhancedKeyUsageIdentifier(ptr str)
|
||||
@ stdcall CertAddSerializedElementToStore(ptr ptr long long long long ptr ptr)
|
||||
@ stdcall CertAddStoreToCollection(ptr ptr long long)
|
||||
|
|
|
@ -4054,6 +4054,13 @@ BOOL WINAPI CertAddEncodedCertificateToStore(HCERTSTORE hCertStore,
|
|||
DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded,
|
||||
DWORD dwAddDisposition, PCCERT_CONTEXT *ppCertContext);
|
||||
|
||||
BOOL WINAPI CertAddEncodedCertificateToSystemStoreA(LPCSTR pszCertStoreName,
|
||||
const BYTE *pbCertEncoded, DWORD cbCertEncoded);
|
||||
BOOL WINAPI CertAddEncodedCertificateToSystemStoreW(LPCWSTR pszCertStoreName,
|
||||
const BYTE *pbCertEncoded, DWORD cbCertEncoded);
|
||||
#define CertAddEncodedCertificateToSystemStore \
|
||||
WINELIB_NAME_AW(CertAddEncodedCertificateToSystemStore)
|
||||
|
||||
BOOL WINAPI CertAddEncodedCRLToStore(HCERTSTORE hCertStore,
|
||||
DWORD dwCertEncodingType, const BYTE *pbCrlEncoded, DWORD cbCrlEncoded,
|
||||
DWORD dwAddDisposition, PCCRL_CONTEXT *ppCrlContext);
|
||||
|
|
Loading…
Reference in a new issue