From 473a120ba2e71ea773a9fdeca66b77a4ee66bb48 Mon Sep 17 00:00:00 2001 From: toddouska Date: Wed, 25 Feb 2015 13:34:29 -0800 Subject: [PATCH] remove more stale cyassl headers --- examples/client/client.c | 10 +++++----- examples/echoclient/echoclient.c | 2 ++ examples/echoserver/echoserver.h | 2 +- examples/server/server.h | 2 +- tests/api.c | 6 +++--- tests/suites.c | 12 ++++++------ tests/unit.c | 2 +- tests/unit.h | 3 ++- testsuite/testsuite.c | 1 + wolfssl/test.h | 1 - 10 files changed, 22 insertions(+), 19 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index 9fa77d099..1883b3bf9 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -122,8 +122,8 @@ static void Usage(void) printf("client " LIBWOLFSSL_VERSION_STRING " NOTE: All files relative to wolfSSL home dir\n"); printf("-? Help, print this usage\n"); - printf("-h Host to connect to, default %s\n", yasslIP); - printf("-p Port to connect on, not 0, default %d\n", yasslPort); + printf("-h Host to connect to, default %s\n", wolfSSLIP); + printf("-p Port to connect on, not 0, default %d\n", wolfSSLPort); printf("-v SSL version [0-3], SSLv3(0) - TLS1.2(3)), default %d\n", CLIENT_DEFAULT_VERSION); printf("-l Cipher list\n"); @@ -193,9 +193,9 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) int input; int msgSz = (int)strlen(msg); - word16 port = yasslPort; - char* host = (char*)yasslIP; - const char* domain = "www.yassl.com"; + word16 port = wolfSSLPort; + char* host = (char*)wolfSSLIP; + const char* domain = "www.wolfssl.com"; int ch; int version = CLIENT_INVALID_VERSION; diff --git a/examples/echoclient/echoclient.c b/examples/echoclient/echoclient.c index 759961e83..5751622d5 100644 --- a/examples/echoclient/echoclient.c +++ b/examples/echoclient/echoclient.c @@ -25,6 +25,8 @@ #include +/* let's use cyassl layer AND cyassl openssl layer */ +#include #include #if defined(CYASSL_MDK_ARM) diff --git a/examples/echoserver/echoserver.h b/examples/echoserver/echoserver.h index c9406bcce..2f0d88d3d 100644 --- a/examples/echoserver/echoserver.h +++ b/examples/echoserver/echoserver.h @@ -21,4 +21,4 @@ #pragma once -THREAD_RETURN CYASSL_THREAD echoserver_test(void* args); +THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args); diff --git a/examples/server/server.h b/examples/server/server.h index b3f6b1d9b..c42260fce 100644 --- a/examples/server/server.h +++ b/examples/server/server.h @@ -21,4 +21,4 @@ #pragma once -THREAD_RETURN CYASSL_THREAD server_test(void* args); +THREAD_RETURN WOLFSSL_THREAD server_test(void* args); diff --git a/tests/api.c b/tests/api.c index cc308a50c..1c14c5242 100644 --- a/tests/api.c +++ b/tests/api.c @@ -301,7 +301,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_nofail(void* args) { SOCKET_T sockfd = 0; SOCKET_T clientfd = 0; - word16 port = yasslPort; + word16 port = wolfSSLPort; WOLFSSL_METHOD* method = 0; WOLFSSL_CTX* ctx = 0; @@ -463,7 +463,7 @@ static void test_client_nofail(void* args) goto done2; } - tcp_connect(&sockfd, yasslIP, ((func_args*)args)->signal->port, 0); + tcp_connect(&sockfd, wolfSSLIP, ((func_args*)args)->signal->port, 0); ssl = wolfSSL_new(ctx); wolfSSL_set_fd(ssl, sockfd); @@ -514,7 +514,7 @@ static THREAD_RETURN WOLFSSL_THREAD run_wolfssl_server(void* args) WOLFSSL* ssl = NULL; SOCKET_T sfd = 0; SOCKET_T cfd = 0; - word16 port = yasslPort; + word16 port = wolfSSLPort; char msg[] = "I hear you fa shizzle!"; int len = (int) XSTRLEN(msg); diff --git a/tests/suites.c b/tests/suites.c index 3caea041d..d1abc19c9 100644 --- a/tests/suites.c +++ b/tests/suites.c @@ -23,12 +23,12 @@ #include #endif -#include +#include #include #include #include -#include +#include #include @@ -109,7 +109,7 @@ static int IsValidCipherSuite(const char* line, char* suite) } if (found) { - if (CyaSSL_CTX_set_cipher_list(cipherSuiteCtx, suite) == SSL_SUCCESS) + if (wolfSSL_CTX_set_cipher_list(cipherSuiteCtx, suite) == SSL_SUCCESS) valid = 1; } @@ -428,7 +428,7 @@ int SuiteTest(void) (void)test_harness; - cipherSuiteCtx = CyaSSL_CTX_new(CyaTLSv1_2_client_method()); + cipherSuiteCtx = wolfSSL_CTX_new(wolfTLSv1_2_client_method()); if (cipherSuiteCtx == NULL) { printf("can't get cipher suite ctx\n"); exit(EXIT_FAILURE); @@ -459,8 +459,8 @@ int SuiteTest(void) printf(" End Cipher Suite Tests\n"); - CyaSSL_CTX_free(cipherSuiteCtx); - CyaSSL_Cleanup(); + wolfSSL_CTX_free(cipherSuiteCtx); + wolfSSL_Cleanup(); return args.return_code; } diff --git a/tests/unit.c b/tests/unit.c index 75d1fc92c..d66f84cf7 100644 --- a/tests/unit.c +++ b/tests/unit.c @@ -6,7 +6,7 @@ #include #endif -#include +#include #include #include diff --git a/tests/unit.h b/tests/unit.h index 0ec91a0fb..ab8fbc2ff 100644 --- a/tests/unit.h +++ b/tests/unit.h @@ -3,7 +3,8 @@ #ifndef CyaSSL_UNIT_H #define CyaSSL_UNIT_H -#include /* thread and tcp stuff */ +#include +#include /* thread and tcp stuff */ #define Fail(description, result) do { \ printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \ diff --git a/testsuite/testsuite.c b/testsuite/testsuite.c index 2f1767cf8..2ea27adf1 100644 --- a/testsuite/testsuite.c +++ b/testsuite/testsuite.c @@ -25,6 +25,7 @@ #include +#include #include #include "wolfcrypt/test/test.h" diff --git a/wolfssl/test.h b/wolfssl/test.h index b822c2382..5fd24520e 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -7,7 +7,6 @@ #include #include #include -#include /* portability layer */ #include #include #include