]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix MinGW build: CertCreateCertificateContext() is now known
authorJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 16:10:10 +0000 (18:10 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Dec 2009 16:10:10 +0000 (18:10 +0200)
src/crypto/crypto_cryptoapi.c

index 568fe0fcdd3bf47d90a8c060bf3df70c2e0e02fc..d0247ba51879583ba749f2d1d2e4dcf4025a6e12 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * WPA Supplicant / Crypto wrapper for Microsoft CryptoAPI
- * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
+ * Crypto wrapper for Microsoft CryptoAPI
+ * Copyright (c) 2005-2009, Jouni Malinen <j@w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -39,12 +39,6 @@ L"Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
  * define here whatever extra is needed.
  */
 
-static PCCERT_CONTEXT WINAPI
-(*CertCreateCertificateContext)(DWORD dwCertEncodingType,
-                               const BYTE *pbCertEncoded,
-                               DWORD cbCertEncoded)
-= NULL; /* to be loaded from crypt32.dll */
-
 static BOOL WINAPI
 (*CryptImportPublicKeyInfo)(HCRYPTPROV hCryptProv, DWORD dwCertEncodingType,
                            PCERT_PUBLIC_KEY_INFO pInfo, HCRYPTKEY *phKey)
@@ -58,7 +52,7 @@ static int mingw_load_crypto_func(void)
        /* MinGW does not yet have full CryptoAPI support, so load the needed
         * function here. */
 
-       if (CertCreateCertificateContext)
+       if (CryptImportPublicKeyInfo)
                return 0;
 
        dll = LoadLibrary("crypt32");
@@ -68,15 +62,6 @@ static int mingw_load_crypto_func(void)
                return -1;
        }
 
-       CertCreateCertificateContext = (void *) GetProcAddress(
-               dll, "CertCreateCertificateContext");
-       if (CertCreateCertificateContext == NULL) {
-               wpa_printf(MSG_DEBUG, "CryptoAPI: Could not get "
-                          "CertCreateCertificateContext() address from "
-                          "crypt32 library");
-               return -1;
-       }
-
        CryptImportPublicKeyInfo = GetProcAddress(
                dll, "CryptImportPublicKeyInfo");
        if (CryptImportPublicKeyInfo == NULL) {