aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-05-30 19:53:49 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-05-30 19:53:49 +0000
commit6aa7fb8de2a73e7910f9742546ee13bc148a6fe1 (patch)
treef156472f6a7f7930e287339c9c10a952cc8a8241
parentAdded new 'autolocal' redirect-gateway flag. When enabled, the OpenVPN (diff)
downloadopenvpn-6aa7fb8de2a73e7910f9742546ee13bc148a6fe1.tar.xz
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
-rw-r--r--config-win32.h.in1
-rw-r--r--cryptoapi.c4
-rw-r--r--ssl.c8
-rw-r--r--ssl.h2
4 files changed, 7 insertions, 8 deletions
diff --git a/config-win32.h.in b/config-win32.h.in
index b7fbdd6..7a0119d 100644
--- a/config-win32.h.in
+++ b/config-win32.h.in
@@ -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
diff --git a/cryptoapi.c b/cryptoapi.c
index e100469..0e6b64c 100644
--- a/cryptoapi.c
+++ b/cryptoapi.c
@@ -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;
diff --git a/ssl.c b/ssl.c
index 37dcfe0..292a554 100644
--- a/ssl.c
+++ b/ssl.c
@@ -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;
}
}
diff --git a/ssl.h b/ssl.h
index 6dedac1..dabe6f8 100644
--- a/ssl.h
+++ b/ssl.h
@@ -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?