mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-05-05 19:34:12 +02:00
Remove cyassl from example code
This commit is contained in:
@@ -24,14 +24,14 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ctaocrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
/* let's use cyassl layer AND cyassl openssl layer */
|
||||
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
|
||||
#include <cyassl/ssl.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
/* Force enable the compatibility macros for this example */
|
||||
#ifdef WOLFSSL_DTLS
|
||||
#include <cyassl/error-ssl.h>
|
||||
#include <wolfssl/error-ssl.h>
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||
@@ -43,12 +43,12 @@
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
#endif
|
||||
|
||||
#include <cyassl/test.h>
|
||||
#include <wolfssl/test.h>
|
||||
|
||||
#ifndef OPENSSL_EXTRA_X509_SMALL
|
||||
#define OPENSSL_EXTRA_X509_SMALL
|
||||
#endif
|
||||
#include <cyassl/openssl/ssl.h>
|
||||
#include <wolfssl/openssl/ssl.h>
|
||||
|
||||
#include <examples/echoclient/echoclient.h>
|
||||
|
||||
@@ -134,7 +134,7 @@ void echoclient_test(void* args)
|
||||
#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(WOLFSSL_MDK_SHELL)
|
||||
port = ((func_args*)args)->signal->port;
|
||||
#else
|
||||
port = yasslPort;
|
||||
port = wolfSSLPort;
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_DTLS)
|
||||
@@ -145,9 +145,9 @@ void echoclient_test(void* args)
|
||||
#endif
|
||||
#elif !defined(NO_TLS)
|
||||
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_SNIFFER)
|
||||
method = CyaTLSv1_2_client_method();
|
||||
method = WolfTLSv1_2_client_method();
|
||||
#else
|
||||
method = CyaSSLv23_client_method();
|
||||
method = wolfSSLv23_client_method();
|
||||
#endif
|
||||
#elif defined(WOLFSSL_ALLOW_SSLV3)
|
||||
method = SSLv3_client_method();
|
||||
@@ -189,7 +189,7 @@ void echoclient_test(void* args)
|
||||
if (doPSK) {
|
||||
const char *defaultCipherList;
|
||||
|
||||
CyaSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb);
|
||||
wolfSSL_CTX_set_psk_client_callback(ctx, my_psk_client_cb);
|
||||
#ifdef HAVE_NULL_CIPHER
|
||||
defaultCipherList = "PSK-NULL-SHA256";
|
||||
#elif defined(HAVE_AESGCM) && !defined(NO_DH)
|
||||
@@ -211,7 +211,7 @@ void echoclient_test(void* args)
|
||||
#else
|
||||
defaultCipherList = "PSK-AES128-CBC-SHA256";
|
||||
#endif
|
||||
if (CyaSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=WOLFSSL_SUCCESS)
|
||||
if (wolfSSL_CTX_set_cipher_list(ctx,defaultCipherList) !=WOLFSSL_SUCCESS)
|
||||
err_sys("client can't set cipher list 2");
|
||||
wolfSSL_CTX_set_psk_callback_ctx(ctx, (void*)defaultCipherList);
|
||||
}
|
||||
@@ -222,7 +222,7 @@ void echoclient_test(void* args)
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
CyaSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_NONE, 0);
|
||||
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_NONE, 0);
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
@@ -234,7 +234,7 @@ void echoclient_test(void* args)
|
||||
#endif /* WOLFSSL_ASYNC_CRYPT */
|
||||
|
||||
ssl = SSL_new(ctx);
|
||||
tcp_connect(&sockfd, yasslIP, port, doDTLS, 0, ssl);
|
||||
tcp_connect(&sockfd, wolfSSLIP, port, doDTLS, 0, ssl);
|
||||
|
||||
SSL_set_fd(ssl, sockfd);
|
||||
#if defined(USE_WINDOWS_API) && defined(WOLFSSL_DTLS) && defined(NO_MAIN_DRIVER)
|
||||
@@ -394,9 +394,9 @@ void echoclient_test(void* args)
|
||||
args.argv = argv;
|
||||
args.return_code = 0;
|
||||
|
||||
CyaSSL_Init();
|
||||
wolfSSL_Init();
|
||||
#if defined(DEBUG_WOLFSSL) && !defined(WOLFSSL_MDK_SHELL)
|
||||
CyaSSL_Debugging_ON();
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
#ifndef WOLFSSL_TIRTOS
|
||||
ChangeToWolfRoot();
|
||||
@@ -405,7 +405,7 @@ void echoclient_test(void* args)
|
||||
echoclient_test(&args);
|
||||
#endif
|
||||
|
||||
CyaSSL_Cleanup();
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
#ifdef HAVE_WNR
|
||||
if (wc_FreeNetRandom() < 0)
|
||||
|
||||
Reference in New Issue
Block a user