From 46b0b2d370c51bd4c5b80a4c400cb29b2d414b67 Mon Sep 17 00:00:00 2001 From: toddouska Date: Thu, 15 Dec 2011 10:34:34 -0800 Subject: [PATCH 1/2] fix v2 usage, only with OPENSSL_EXTRA --- tests/api.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/api.c b/tests/api.c index 3e245da43..4672783b9 100644 --- a/tests/api.c +++ b/tests/api.c @@ -177,7 +177,8 @@ int test_CyaSSL_Method_Allocators(void) } free(method); method = NULL; - + +#ifdef OPENSSL_EXTRA method = CyaSSLv2_client_method(); if (method == NULL) { @@ -195,6 +196,7 @@ int test_CyaSSL_Method_Allocators(void) } free(method); method = NULL; +#endif /* OPENSSL_EXTRA */ return TEST_SUCCESS; } @@ -229,7 +231,7 @@ int test_CyaSSL_CTX_new(CYASSL_METHOD *method) int test_CyaSSL_CTX_user_certificate_file(void) { - CYASSL_METHOD *method = CyaSSLv2_server_method(); + CYASSL_METHOD *method = CyaSSLv23_server_method(); if (method != NULL) { CYASSL_CTX *ctx = CyaSSL_CTX_new(method); @@ -286,7 +288,7 @@ int test_CyaSSL_CTX_user_certificate_file(void) int test_CyaSSL_new(void) { - CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv2_server_method()); + CYASSL_CTX *ctx = CyaSSL_CTX_new(CyaSSLv23_server_method()); if (ctx != NULL) { int result; From 0254194e20bda93e4f19c59edb1d4ad91a4816fc Mon Sep 17 00:00:00 2001 From: toddouska Date: Thu, 15 Dec 2011 11:42:31 -0800 Subject: [PATCH 2/2] lean and mean windows fix --- ctaocrypt/src/random.c | 4 +++- cyassl/internal.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ctaocrypt/src/random.c b/ctaocrypt/src/random.c index b1ea1e70d..27a63b386 100644 --- a/ctaocrypt/src/random.c +++ b/ctaocrypt/src/random.c @@ -33,7 +33,9 @@ #if defined(USE_WINDOWS_API) - #define _WIN32_WINNT 0x0400 + #ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 + #endif #include #include #else diff --git a/cyassl/internal.h b/cyassl/internal.h index 241783315..75eb69e4b 100644 --- a/cyassl/internal.h +++ b/cyassl/internal.h @@ -50,6 +50,10 @@ #ifdef CYASSL_GAME_BUILD #include "system/xtl.h" #else + #if defined(_WIN32_WCE) || defined(WIN32_LEAN_AND_MEAN) + /* On WinCE winsock2.h must be included before windows.h */ + #include + #endif #include #endif #elif defined(THREADX)