crypt32: Fix the I_Crypt*Asn1*() prototypes. Add the i_cryptasn1tls.h header and use it.

Francois Gouget fgouget at free.fr
Tue Sep 11 09:48:04 CDT 2007


---
 dlls/crypt32/chain.c      |    4 ++--
 dlls/crypt32/crypt32.spec |    5 +++--
 dlls/crypt32/main.c       |   19 +++++++++++++------
 include/Makefile.in       |    1 +
 include/i_cryptasn1tls.h  |   41 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 60 insertions(+), 10 deletions(-)
 create mode 100644 include/i_cryptasn1tls.h

diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index 4424f52..fd9a4cb 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -164,7 +164,7 @@ BOOL WINAPI CertCreateCertificateChainEngine(PCERT_CHAIN_ENGINE_CONFIG pConfig,
     return ret;
 }
 
-void WINAPI CertFreeCertificateChainEngine(HCERTCHAINENGINE hChainEngine)
+VOID WINAPI CertFreeCertificateChainEngine(HCERTCHAINENGINE hChainEngine)
 {
     PCertificateChainEngine engine = (PCertificateChainEngine)hChainEngine;
 
@@ -994,7 +994,7 @@ PCCERT_CHAIN_CONTEXT WINAPI CertDuplicateCertificateChain(
     return pChainContext;
 }
 
-void WINAPI CertFreeCertificateChain(PCCERT_CHAIN_CONTEXT pChainContext)
+VOID WINAPI CertFreeCertificateChain(PCCERT_CHAIN_CONTEXT pChainContext)
 {
     PCertificateChain chain = (PCertificateChain)pChainContext;
 
diff --git a/dlls/crypt32/crypt32.spec b/dlls/crypt32/crypt32.spec
index e16b3ae..5a27a20 100644
--- a/dlls/crypt32/crypt32.spec
+++ b/dlls/crypt32/crypt32.spec
@@ -198,17 +198,18 @@
 @ stdcall I_CryptFreeLruCache(ptr long long)
 @ stdcall I_CryptFreeTls(long long)
 @ stdcall I_CryptGetAsn1Decoder(long)
+@ stdcall I_CryptGetAsn1Encoder(long)
 @ stdcall I_CryptGetDefaultCryptProv(long)
 @ stub I_CryptGetDefaultCryptProvForEncrypt
 @ stdcall I_CryptGetOssGlobal(long)
 @ stdcall I_CryptGetTls(long)
 @ stub I_CryptInsertLruEntry
-@ stdcall I_CryptInstallAsn1Module(long long long)
+@ stdcall I_CryptInstallAsn1Module(ptr long ptr)
 @ stdcall I_CryptInstallOssGlobal(long long long)
 @ stdcall I_CryptReadTrustedPublisherDWORDValueFromRegistry(wstr ptr)
 @ stub I_CryptReleaseLruEntry
 @ stdcall I_CryptSetTls(long ptr)
-@ stdcall I_CryptUninstallAsn1Module(ptr)
+@ stdcall I_CryptUninstallAsn1Module(long)
 @ stub I_CryptUninstallOssGlobal
 @ stub PFXExportCertStore
 @ stub PFXImportCertStore
diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c
index 9e53e4b..db17447 100644
--- a/dlls/crypt32/main.c
+++ b/dlls/crypt32/main.c
@@ -26,6 +26,7 @@
 #include "wincrypt.h"
 #include "winreg.h"
 #include "winuser.h"
+#include "i_cryptasn1tls.h"
 #include "crypt32_private.h"
 #include "wine/debug.h"
 
@@ -195,21 +196,27 @@ DWORD WINAPI I_CryptInstallOssGlobal(DWORD x, DWORD y, DWORD z)
     return ret;
 }
 
-BOOL WINAPI I_CryptInstallAsn1Module(void *x, DWORD y, DWORD z)
+BOOL WINAPI I_CryptInstallAsn1Module(ASN1module_t x, DWORD y, void* z)
 {
-    FIXME("%p %08x %08x\n", x, y, z);
+    FIXME("(%p %08x %p): stub\n", x, y, z);
     return TRUE;
 }
 
-BOOL WINAPI I_CryptUninstallAsn1Module(void *x)
+BOOL WINAPI I_CryptUninstallAsn1Module(HCRYPTASN1MODULE x)
 {
-    FIXME("%p\n", x);
+    FIXME("(%08x): stub\n", x);
     return TRUE;
 }
 
-void *WINAPI I_CryptGetAsn1Decoder(long x)
+ASN1decoding_t WINAPI I_CryptGetAsn1Decoder(HCRYPTASN1MODULE x)
 {
-    FIXME("%08lx\n", x);
+    FIXME("(%08x): stub\n", x);
+    return NULL;
+}
+
+ASN1encoding_t WINAPI I_CryptGetAsn1Encoder(HCRYPTASN1MODULE x)
+{
+    FIXME("(%08x): stub\n", x);
     return NULL;
 }
 
diff --git a/include/Makefile.in b/include/Makefile.in
index 2557d2a..66c3da5 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -182,6 +182,7 @@ SRCDIR_INCLUDES = \
 	guiddef.h \
 	hlguids.h \
 	htmlhelp.h \
+	i_cryptasn1tls.h \
 	icm.h \
 	icmpapi.h \
 	idispids.h \
diff --git a/include/i_cryptasn1tls.h b/include/i_cryptasn1tls.h
new file mode 100644
index 0000000..aee4adc
--- /dev/null
+++ b/include/i_cryptasn1tls.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2007 Francois Gouget
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_I_CRYPTASN1TLS_H
+#define __WINE_I_CRYPTASN1TLS_H
+
+typedef void *ASN1decoding_t;
+typedef void *ASN1encoding_t;
+typedef void *ASN1module_t;
+typedef DWORD HCRYPTASN1MODULE;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ASN1decoding_t WINAPI I_CryptGetAsn1Decoder(HCRYPTASN1MODULE);
+ASN1encoding_t WINAPI I_CryptGetAsn1Encoder(HCRYPTASN1MODULE);
+BOOL        WINAPI I_CryptInstallAsn1Module(ASN1module_t, DWORD, void*);
+BOOL        WINAPI I_CryptUninstallAsn1Module(HCRYPTASN1MODULE);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* __WINE_I_CRYPTASN1TLS_H */
-- 
1.5.2.4




More information about the wine-patches mailing list