Fixed issue of symbol conflicts interfering with Windows CryptoAPI

functionality (Alon Bar-Lev).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4475 e7ae566f-a301-0410-adde-c780ea21d3b5
This commit is contained in:
james 2009-05-30 19:53:49 +00:00
parent 775a6ac279
commit 6aa7fb8de2
4 changed files with 7 additions and 8 deletions

View File

@ -318,7 +318,6 @@ typedef unsigned long in_addr_t;
#define S_IRUSR 0
#define S_IWUSR 0
typedef int intptr_t;
#undef S_NORMAL
/* Visual Studio 2005 supports vararg macros */
#if _MSC_VER >= 1400
#define HAVE_CPP_VARARG_MACRO_ISO 1

View File

@ -75,7 +75,7 @@ static ERR_STRING_DATA CRYPTOAPI_str_functs[] = {
{ ERR_PACK(ERR_LIB_CRYPTOAPI, 0, 0), "microsoft cryptoapi"},
{ ERR_PACK(0, CRYPTOAPI_F_CERT_OPEN_SYSTEM_STORE, 0), "CertOpenSystemStore" },
{ ERR_PACK(0, CRYPTOAPI_F_CERT_FIND_CERTIFICATE_IN_STORE, 0), "CertFindCertificateInStore" },
{ ERR_PACK(0, CRYPTOAPI_F_CRYPT_ACQUIRE_CERTIFICATE_PRIVATE_KEY, 0), "OpenVPNCryptAcquireCertificatePrivateKey" },
{ ERR_PACK(0, CRYPTOAPI_F_CRYPT_ACQUIRE_CERTIFICATE_PRIVATE_KEY, 0), "CryptAcquireCertificatePrivateKey" },
{ ERR_PACK(0, CRYPTOAPI_F_CRYPT_CREATE_HASH, 0), "CryptCreateHash" },
{ ERR_PACK(0, CRYPTOAPI_F_CRYPT_GET_HASH_PARAM, 0), "CryptGetHashParam" },
{ ERR_PACK(0, CRYPTOAPI_F_CRYPT_SET_HASH_PARAM, 0), "CryptSetHashParam" },
@ -389,7 +389,7 @@ int SSL_CTX_use_CryptoAPI_certificate(SSL_CTX *ssl_ctx, const char *cert_prop)
}
if (OpenVPNCryptAcquireCertificatePrivateKey == NULL) {
OpenVPNCryptAcquireCertificatePrivateKey = GetProcAddress(crypt32dll,
"OpenVPNCryptAcquireCertificatePrivateKey");
"CryptAcquireCertificatePrivateKey");
if (OpenVPNCryptAcquireCertificatePrivateKey == NULL) {
CRYPTOAPIerr(CRYPTOAPI_F_GET_PROC_ADDRESS);
goto err;

8
ssl.c
View File

@ -1716,8 +1716,8 @@ state_name (int state)
return "S_GOT_KEY";
case S_ACTIVE:
return "S_ACTIVE";
case S_NORMAL:
return "S_NORMAL";
case S_NORMAL_OP:
return "S_NORMAL_OP";
case S_ERROR:
return "S_ERROR";
default:
@ -3642,8 +3642,8 @@ tls_process (struct tls_multi *multi,
}
else /* assume that ks->state == S_ACTIVE */
{
dmsg (D_TLS_DEBUG_MED, "STATE S_NORMAL");
ks->state = S_NORMAL;
dmsg (D_TLS_DEBUG_MED, "STATE S_NORMAL_OP");
ks->state = S_NORMAL_OP;
ks->must_negotiate = 0;
}
}

2
ssl.h
View File

@ -230,7 +230,7 @@
#define S_SENT_KEY 4 /* client does S_SENT_KEY -> S_GOT_KEY */
#define S_GOT_KEY 5 /* server does S_GOT_KEY -> S_SENT_KEY */
#define S_ACTIVE 6 /* ready to exchange data channel packets */
#define S_NORMAL 7 /* normal operations */
#define S_NORMAL_OP 7 /* normal operations */
/*
* Are we ready to receive data channel packets?