diff --git a/config-win32.h.in b/config-win32.h.in index b7fbdd66..7a0119d7 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 e1004695..0e6b64c4 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 37dcfe09..292a554a 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 6dedac1c..dabe6f8e 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?