aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-20 16:10:10 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-09 19:20:50 (GMT)
commit59109312a113863555e1cfbc4b513a8ba3b4f771 (patch)
treeaa2c796bc79d85878c1653fbbfaab5a6fcf09e2c
parentc49d3440efabbdefd3a8ffa64db3725fc38aea30 (diff)
downloadhostap-06-59109312a113863555e1cfbc4b513a8ba3b4f771.zip
hostap-06-59109312a113863555e1cfbc4b513a8ba3b4f771.tar.gz
hostap-06-59109312a113863555e1cfbc4b513a8ba3b4f771.tar.bz2
Fix MinGW build: CertCreateCertificateContext() is now known
(cherry picked from commit de979ef18c1aced0597e342de7dab37c15718090)
-rw-r--r--src/crypto/crypto_cryptoapi.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/crypto/crypto_cryptoapi.c b/src/crypto/crypto_cryptoapi.c
index bb05730..45333dd 100644
--- a/src/crypto/crypto_cryptoapi.c
+++ b/src/crypto/crypto_cryptoapi.c
@@ -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
@@ -40,12 +40,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)
@@ -59,7 +53,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");
@@ -69,15 +63,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) {