Module: wine Branch: master Commit: 764b9bef196608f21a0a56e1f46b47beea2c0c62 URL: http://source.winehq.org/git/wine.git/?a=commit;h=764b9bef196608f21a0a56e1f4...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Jun 23 09:36:26 2009 +0200
crypt32: Add a partial implementation of CertCreateContext.
---
dlls/crypt32/cert.c | 32 ++++++++++++++++++++++++++++++++ dlls/crypt32/crypt32.spec | 1 + 2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 2b43d3e..1c0c74e 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -2951,3 +2951,35 @@ BOOL WINAPI CertVerifyCTLUsage(DWORD dwEncodingType, DWORD dwSubjectType, SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } + +const void * WINAPI CertCreateContext(DWORD dwContextType, DWORD dwEncodingType, + const BYTE *pbEncoded, DWORD cbEncoded, + DWORD dwFlags, PCERT_CREATE_CONTEXT_PARA pCreatePara) +{ + TRACE("(0x%x, 0x%x, %p, %d, 0x%08x, %p)\n", dwContextType, dwEncodingType, + pbEncoded, cbEncoded, dwFlags, pCreatePara); + + if (dwFlags) + { + FIXME("dwFlags 0x%08x not handled\n", dwFlags); + return NULL; + } + if (pCreatePara) + { + FIXME("pCreatePara not handled\n"); + return NULL; + } + + switch (dwContextType) + { + case CERT_STORE_CERTIFICATE_CONTEXT: + return CertCreateCertificateContext(dwEncodingType, pbEncoded, cbEncoded); + case CERT_STORE_CRL_CONTEXT: + return CertCreateCRLContext(dwEncodingType, pbEncoded, cbEncoded); + case CERT_STORE_CTL_CONTEXT: + return CertCreateCTLContext(dwEncodingType, pbEncoded, cbEncoded); + default: + WARN("unknown context type: 0x%x\n", dwContextType); + return NULL; + } +} diff --git a/dlls/crypt32/crypt32.spec b/dlls/crypt32/crypt32.spec index 3591d17..f271b62 100644 --- a/dlls/crypt32/crypt32.spec +++ b/dlls/crypt32/crypt32.spec @@ -20,6 +20,7 @@ @ stdcall CertCreateCTLContext(long ptr long) @ stdcall CertCreateCertificateChainEngine(ptr ptr) @ stdcall CertCreateCertificateContext(long ptr long) +@ stdcall CertCreateContext(long long ptr long long ptr) @ stdcall CertCreateSelfSignCertificate(long ptr long ptr ptr ptr ptr ptr) @ stdcall CertDeleteCRLFromStore(ptr) @ stdcall CertDeleteCTLFromStore(ptr)