From fc1ddf117f963138d222bc53bdf5a4937a142893 Mon Sep 17 00:00:00 2001 From: Kaleb Himes Date: Thu, 18 Dec 2014 11:40:51 -0700 Subject: [PATCH] header updates --- cyassl/ctaocrypt/visibility.h | 71 +++++++++++++++--------------- cyassl/ssl.h | 1 + wolfssl/certs_test.h | 6 +-- wolfssl/crl.h | 28 ++++++------ wolfssl/error-ssl.h | 20 ++++----- wolfssl/ocsp.h | 26 +++++------ wolfssl/options.h | 4 +- wolfssl/sniffer.h | 26 +++++------ wolfssl/sniffer_error.h | 12 ++--- wolfssl/ssl.h | 44 +++++++++---------- wolfssl/test.h | 22 +++++----- wolfssl/version.h | 12 ++--- wolfssl/wolfcrypt/visibility.h | 3 +- wolfssl/wolfcrypt/wc_port.h | 80 +++++++++++++++++----------------- 14 files changed, 177 insertions(+), 178 deletions(-) diff --git a/cyassl/ctaocrypt/visibility.h b/cyassl/ctaocrypt/visibility.h index ed9f1a09f..625157d5e 100644 --- a/cyassl/ctaocrypt/visibility.h +++ b/cyassl/ctaocrypt/visibility.h @@ -21,9 +21,8 @@ /* Visibility control macros */ -#include -// #ifndef CTAO_CRYPT_VISIBILITY_H -// #define CTAO_CRYPT_VISIBILITY_H +#ifndef CTAO_CRYPT_VISIBILITY_H +#define CTAO_CRYPT_VISIBILITY_H /* CYASSL_API is used for the public API symbols. @@ -32,39 +31,39 @@ CYASSL_LOCAL is used for non-API symbols (private). */ -// #if defined(BUILDING_CYASSL) -// #if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY -// #define CYASSL_API __attribute__ ((visibility("default"))) -// #define CYASSL_LOCAL __attribute__ ((visibility("hidden"))) -// #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) -// #define CYASSL_API __global -// #define CYASSL_LOCAL __hidden -// #elif defined(_MSC_VER) -// #ifdef CYASSL_DLL -// #define CYASSL_API extern __declspec(dllexport) -// #else -// //#define CYASSL_API -// #define CYASSL_API: -// #endif -// #define CYASSL_LOCAL -// #else -// #define CYASSL_API -// #define CYASSL_LOCAL -// #endif /* HAVE_VISIBILITY */ -// #else /* BUILDING_CYASSL */ -// #if defined(_MSC_VER) -// #ifdef CYASSL_DLL -// #define CYASSL_API extern __declspec(dllimport) -// #else -// #define CYASSL_API -// #endif -// #define CYASSL_LOCAL -// #else -// #define CYASSL_API -// #define CYASSL_LOCAL -// #endif -// #endif /* BUILDING_CYASSL */ +#if defined(BUILDING_CYASSL) + #if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY + #define CYASSL_API __attribute__ ((visibility("default"))) + #define CYASSL_LOCAL __attribute__ ((visibility("hidden"))) + #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) + #define CYASSL_API __global + #define CYASSL_LOCAL __hidden + #elif defined(_MSC_VER) + #ifdef CYASSL_DLL + #define CYASSL_API extern __declspec(dllexport) + #else + //#define CYASSL_API + #define CYASSL_API: + #endif + #define CYASSL_LOCAL + #else + #define CYASSL_API + #define CYASSL_LOCAL + #endif /* HAVE_VISIBILITY */ +#else /* BUILDING_CYASSL */ + #if defined(_MSC_VER) + #ifdef CYASSL_DLL + #define CYASSL_API extern __declspec(dllimport) + #else + #define CYASSL_API + #endif + #define CYASSL_LOCAL + #else + #define CYASSL_API + #define CYASSL_LOCAL + #endif +#endif /* BUILDING_CYASSL */ -// #endif /* CTAO_CRYPT_VISIBILITY_H */ +#endif /* CTAO_CRYPT_VISIBILITY_H */ diff --git a/cyassl/ssl.h b/cyassl/ssl.h index d96e0d935..e5742fcf1 100644 --- a/cyassl/ssl.h +++ b/cyassl/ssl.h @@ -89,6 +89,7 @@ #define CYASSL_TLSV1_1 WOLFSSL_TLSV1_1 #define CYASSL_TLSV1_2 WOLFSSL_TLSV1_2 #define CYASSL_SSLV3 WOLFSSL_SSLV3 +#define MAX_CYASSL_FILE_SIZE MAX_WOLFSSL_FILE_SIZE #define CyaSSL_session_reused wolfSSL_session_reused #define CyaSSL_get_version wolfSSL_get_version #define CyaSSL_get_shutdown wolfSSL_get_shutdown diff --git a/wolfssl/certs_test.h b/wolfssl/certs_test.h index 0d4373b2c..665ff75d1 100644 --- a/wolfssl/certs_test.h +++ b/wolfssl/certs_test.h @@ -1,7 +1,7 @@ /* certs_test.h */ -#ifndef CYASSL_CERTS_TEST_H -#define CYASSL_CERTS_TEST_H +#ifndef WOLFSSL_CERTS_TEST_H +#define WOLFSSL_CERTS_TEST_H #ifdef USE_CERT_BUFFERS_1024 @@ -1174,5 +1174,5 @@ const int sizeof_server_cert_der_2048 = sizeof(server_cert_der_2048); #endif /* USE_CERT_BUFFERS_1024 */ -#endif /* CYASSL_CERTS_TEST_H */ +#endif /* WOLFSSL_CERTS_TEST_H */ diff --git a/wolfssl/crl.h b/wolfssl/crl.h index c3dbfd7c1..21d1629b0 100644 --- a/wolfssl/crl.h +++ b/wolfssl/crl.h @@ -2,14 +2,14 @@ * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. (formerly known as CyaSSL) * - * CyaSSL is free software; you can redistribute it and/or modify + * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * CyaSSL is distributed in the hope that it will be useful, + * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -20,27 +20,27 @@ */ -#ifndef CYASSL_CRL_H -#define CYASSL_CRL_H +#ifndef WOLFSSL_CRL_H +#define WOLFSSL_CRL_H #ifdef HAVE_CRL -#include -#include +#include +#include #ifdef __cplusplus extern "C" { #endif -typedef struct CYASSL_CRL CYASSL_CRL; +typedef struct WOLFSSL_CRL WOLFSSL_CRL; -CYASSL_LOCAL int InitCRL(CYASSL_CRL*, CYASSL_CERT_MANAGER*); -CYASSL_LOCAL void FreeCRL(CYASSL_CRL*, int dynamic); +WOLFSSL_LOCAL int InitCRL(WOLFSSL_CRL*, WOLFSSL_CERT_MANAGER*); +WOLFSSL_LOCAL void FreeCRL(WOLFSSL_CRL*, int dynamic); -CYASSL_LOCAL int LoadCRL(CYASSL_CRL* crl, const char* path, int type, int mon); -CYASSL_LOCAL int BufferLoadCRL(CYASSL_CRL*, const byte*, long, int); -CYASSL_LOCAL int CheckCertCRL(CYASSL_CRL*, DecodedCert*); +WOLFSSL_LOCAL int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int mon); +WOLFSSL_LOCAL int BufferLoadCRL(WOLFSSL_CRL*, const byte*, long, int); +WOLFSSL_LOCAL int CheckCertCRL(WOLFSSL_CRL*, DecodedCert*); #ifdef __cplusplus @@ -48,4 +48,4 @@ CYASSL_LOCAL int CheckCertCRL(CYASSL_CRL*, DecodedCert*); #endif #endif /* HAVE_CRL */ -#endif /* CYASSL_CRL_H */ +#endif /* WOLFSSL_CRL_H */ diff --git a/wolfssl/error-ssl.h b/wolfssl/error-ssl.h index 0745529ad..a5cd445a6 100644 --- a/wolfssl/error-ssl.h +++ b/wolfssl/error-ssl.h @@ -2,14 +2,14 @@ * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. (formerly known as CyaSSL) * - * CyaSSL is free software; you can redistribute it and/or modify + * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * CyaSSL is distributed in the hope that it will be useful, + * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -20,16 +20,16 @@ */ -#ifndef CYASSL_ERROR_H -#define CYASSL_ERROR_H +#ifndef WOLFSSL_ERROR_H +#define WOLFSSL_ERROR_H -#include /* pull in CTaoCrypt errors */ +#include /* pull in CTaoCrypt errors */ #ifdef __cplusplus extern "C" { #endif -enum CyaSSL_ErrorCodes { +enum wolfSSL_ErrorCodes { INPUT_CASE_ERROR = -301, /* process input state error */ PREFIX_ERROR = -302, /* bad index to key rounds */ MEMORY_ERROR = -303, /* out of memory */ @@ -140,7 +140,7 @@ enum CyaSSL_ErrorCodes { }; -#ifdef CYASSL_CALLBACKS +#ifdef WOLFSSL_CALLBACKS enum { MIN_PARAM_ERR = UNSUPPORTED_SUITE, MAX_PARAM_ERR = MIN_PARAM_ERR - 10 @@ -148,7 +148,7 @@ enum CyaSSL_ErrorCodes { #endif -CYASSL_LOCAL +WOLFSSL_LOCAL void SetErrorString(int err, char* buff); @@ -157,6 +157,6 @@ void SetErrorString(int err, char* buff); #endif -#endif /* CyaSSL_ERROR_H */ +#endif /* wolfSSL_ERROR_H */ diff --git a/wolfssl/ocsp.h b/wolfssl/ocsp.h index 3fc4f9f01..8be015cd5 100644 --- a/wolfssl/ocsp.h +++ b/wolfssl/ocsp.h @@ -2,14 +2,14 @@ * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. (formerly known as CyaSSL) * - * CyaSSL is free software; you can redistribute it and/or modify + * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * CyaSSL is distributed in the hope that it will be useful, + * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -20,26 +20,26 @@ */ -/* CyaSSL OCSP API */ +/* wolfSSL OCSP API */ -#ifndef CYASSL_OCSP_H -#define CYASSL_OCSP_H +#ifndef WOLFSSL_OCSP_H +#define WOLFSSL_OCSP_H #ifdef HAVE_OCSP -#include -#include +#include +#include #ifdef __cplusplus extern "C" { #endif -typedef struct CYASSL_OCSP CYASSL_OCSP; +typedef struct WOLFSSL_OCSP WOLFSSL_OCSP; -CYASSL_LOCAL int InitOCSP(CYASSL_OCSP*, CYASSL_CERT_MANAGER*); -CYASSL_LOCAL void FreeOCSP(CYASSL_OCSP*, int dynamic); +WOLFSSL_LOCAL int InitOCSP(WOLFSSL_OCSP*, WOLFSSL_CERT_MANAGER*); +WOLFSSL_LOCAL void FreeOCSP(WOLFSSL_OCSP*, int dynamic); -CYASSL_LOCAL int CheckCertOCSP(CYASSL_OCSP*, DecodedCert*); +WOLFSSL_LOCAL int CheckCertOCSP(WOLFSSL_OCSP*, DecodedCert*); #ifdef __cplusplus } /* extern "C" */ @@ -47,6 +47,6 @@ CYASSL_LOCAL int CheckCertOCSP(CYASSL_OCSP*, DecodedCert*); #endif /* HAVE_OCSP */ -#endif /* CYASSL_OCSP_H */ +#endif /* WOLFSSL_OCSP_H */ diff --git a/wolfssl/options.h b/wolfssl/options.h index d2c000566..6963bffad 100644 --- a/wolfssl/options.h +++ b/wolfssl/options.h @@ -1,9 +1,9 @@ -/* cyassl options.h +/* wolfssl options.h * generated from configure options * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. (formerly known as CyaSSL) * */ diff --git a/wolfssl/sniffer.h b/wolfssl/sniffer.h index 3557d8b4d..5b0c82411 100644 --- a/wolfssl/sniffer.h +++ b/wolfssl/sniffer.h @@ -2,14 +2,14 @@ * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. (formerly known as CyaSSL) * - * CyaSSL is free software; you can redistribute it and/or modify + * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * CyaSSL is distributed in the hope that it will be useful, + * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -20,10 +20,10 @@ */ -#ifndef CYASSL_SNIFFER_H -#define CYASSL_SNIFFER_H +#ifndef WOLFSSL_SNIFFER_H +#define WOLFSSL_SNIFFER_H -#include +#include #ifdef _WIN32 #ifdef SSL_SNIFFER_EXPORTS @@ -41,28 +41,28 @@ #endif -CYASSL_API +WOLFSSL_API SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port, const char* keyFile, int keyType, const char* password, char* error); -CYASSL_API +WOLFSSL_API SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name, const char* address, int port, const char* keyFile, int keyType, const char* password, char* error); -CYASSL_API +WOLFSSL_API SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length, unsigned char* data, char* error); -CYASSL_API +WOLFSSL_API SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error); -CYASSL_API void ssl_InitSniffer(void); +WOLFSSL_API void ssl_InitSniffer(void); -CYASSL_API void ssl_FreeSniffer(void); +WOLFSSL_API void ssl_FreeSniffer(void); /* ssl_SetPrivateKey keyTypes */ @@ -76,5 +76,5 @@ enum { } /* extern "C" */ #endif -#endif /* CyaSSL_SNIFFER_H */ +#endif /* wolfSSL_SNIFFER_H */ diff --git a/wolfssl/sniffer_error.h b/wolfssl/sniffer_error.h index b34d907cf..4c0d09263 100644 --- a/wolfssl/sniffer_error.h +++ b/wolfssl/sniffer_error.h @@ -2,14 +2,14 @@ * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. (formerly known as CyaSSL) * - * CyaSSL is free software; you can redistribute it and/or modify + * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * CyaSSL is distributed in the hope that it will be useful, + * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -20,8 +20,8 @@ */ -#ifndef CYASSL_SNIFFER_ERROR_H -#define CYASSL_SNIFFER_ERROR_H +#ifndef WOLFSSL_SNIFFER_ERROR_H +#define WOLFSSL_SNIFFER_ERROR_H /* need to have errors as #defines since .rc files can't handle enums */ /* need to start at 1 and go in order for same reason */ @@ -108,5 +108,5 @@ /* !!!! also add to msgTable in sniffer.c and .rc file !!!! */ -#endif /* CyaSSL_SNIFFER_ERROR_H */ +#endif /* wolfSSL_SNIFFER_ERROR_H */ diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index 207cf2d2e..90d5d5d80 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -27,14 +27,14 @@ /* for users not using preprocessor flags*/ -#include -#include +#include +#include /* * Name Change Include - * wolfssl -> cyassl compatability layer + * wolfssl -> wolfssl compatability layer */ -#include +#include #ifndef NO_FILESYSTEM #ifdef FREESCALE_MQX @@ -1095,28 +1095,28 @@ enum { /* for GetBulkCipher and internal use */ enum BulkCipherAlgorithm { - cyassl_cipher_null, - cyassl_rc4, - cyassl_rc2, - cyassl_des, - cyassl_triple_des, /* leading 3 (3des) not valid identifier */ - cyassl_des40, - cyassl_idea, - cyassl_aes, - cyassl_aes_gcm, - cyassl_aes_ccm, - cyassl_chacha, - cyassl_camellia, - cyassl_hc128, /* wolfSSL extensions */ - cyassl_rabbit + wolfssl_cipher_null, + wolfssl_rc4, + wolfssl_rc2, + wolfssl_des, + wolfssl_triple_des, /* leading 3 (3des) not valid identifier */ + wolfssl_des40, + wolfssl_idea, + wolfssl_aes, + wolfssl_aes_gcm, + wolfssl_aes_ccm, + wolfssl_chacha, + wolfssl_camellia, + wolfssl_hc128, /* wolfSSL extensions */ + wolfssl_rabbit }; /* for KDF TLS 1.2 mac types */ enum KDF_MacAlgorithm { - cyassl_sha256 = 4, /* needs to match internal MACAlgorithm */ - cyassl_sha384, - cyassl_sha512 + wolfssl_sha256 = 4, /* needs to match internal MACAlgorithm */ + wolfssl_sha384, + wolfssl_sha512 }; @@ -1381,7 +1381,7 @@ int wolfSSL_DeriveTlsKeys(unsigned char* key_data, unsigned int keyLen, #ifdef WOLFSSL_CALLBACKS /* used internally by wolfSSL while OpenSSL types aren't */ -#include +#include typedef int (*HandShakeCallBack)(HandShakeInfo*); typedef int (*TimeoutCallBack)(TimeoutInfo*); diff --git a/wolfssl/test.h b/wolfssl/test.h index 79a5fd72b..3b323ae3b 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -7,20 +7,20 @@ #include #include #include -#include -#include -#include +#include +#include +#include #ifdef ATOMIC_USER - #include - #include - #include + #include + #include + #include #endif #ifdef HAVE_PK_CALLBACKS - #include - #include + #include + #include #ifdef HAVE_ECC - #include + #include #endif /* HAVE_ECC */ #endif /*HAVE_PK_CALLBACKS */ @@ -1393,7 +1393,7 @@ static INLINE int myMacEncryptCb(WOLFSSL* ssl, unsigned char* macOut, const char* tlsStr = "TLS"; /* example supports (d)tls aes */ - if (wolfSSL_GetBulkCipher(ssl) != cyassl_aes) { + if (wolfSSL_GetBulkCipher(ssl) != wolfssl_aes) { printf("myMacEncryptCb not using AES\n"); return -1; } @@ -1467,7 +1467,7 @@ static INLINE int myDecryptVerifyCb(WOLFSSL* ssl, const char* tlsStr = "TLS"; /* example supports (d)tls aes */ - if (wolfSSL_GetBulkCipher(ssl) != cyassl_aes) { + if (wolfSSL_GetBulkCipher(ssl) != wolfssl_aes) { printf("myMacEncryptCb not using AES\n"); return -1; } diff --git a/wolfssl/version.h b/wolfssl/version.h index 39e6f4ec9..86300d5bc 100644 --- a/wolfssl/version.h +++ b/wolfssl/version.h @@ -1,15 +1,15 @@ -/* cyassl_version.h.in +/* wolfssl_version.h.in * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. (formerly known as CyaSSL) * - * CyaSSL is free software; you can redistribute it and/or modify + * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * CyaSSL is distributed in the hope that it will be useful, + * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -26,8 +26,8 @@ extern "C" { #endif -#define LIBCYASSL_VERSION_STRING "3.3.0" -#define LIBCYASSL_VERSION_HEX 0x03003000 +#define LIBWOLFSSL_VERSION_STRING "3.3.0" +#define LIBWOLFSSL_VERSION_HEX 0x03003000 #ifdef __cplusplus } diff --git a/wolfssl/wolfcrypt/visibility.h b/wolfssl/wolfcrypt/visibility.h index b51881dbc..007495067 100644 --- a/wolfssl/wolfcrypt/visibility.h +++ b/wolfssl/wolfcrypt/visibility.h @@ -21,8 +21,7 @@ /* Visibility control macros */ -#define CTAO_CRYPT_VISIBILITY_H WOLF_CRYPT_VISIBILITY_H -#ifndef WOLF_CRYPT_VISIBILITY_H +#if !defined(WOLF_CRYPT_VISIBILITY_H && CTAO_CRYPT_VISIBILITY_H) #define WOLF_CRYPT_VISIBILITY_H diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index e5e560c21..ad878110b 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -2,14 +2,14 @@ * * Copyright (C) 2006-2014 wolfSSL Inc. * - * This file is part of CyaSSL. + * This file is part of wolfSSL. * - * CyaSSL is free software; you can redistribute it and/or modify + * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * CyaSSL is distributed in the hope that it will be useful, + * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -20,8 +20,8 @@ */ -#ifndef CTAO_CRYPT_PORT_H -#define CTAO_CRYPT_PORT_H +#if !defined(WOLF_CRYPT_PORT_H && CTAO_CRYPT_PORT_H) +#define WOLF_CRYPT_PORT_H #ifdef __cplusplus @@ -30,7 +30,7 @@ #ifdef USE_WINDOWS_API - #ifdef CYASSL_GAME_BUILD + #ifdef WOLFSSL_GAME_BUILD #include "system/xtl.h" #else #ifndef WIN32_LEAN_AND_MEAN @@ -48,26 +48,26 @@ #endif #elif defined(MICRIUM) /* do nothing, just don't pick Unix */ -#elif defined(FREERTOS) || defined(CYASSL_SAFERTOS) +#elif defined(FREERTOS) || defined(WOLFSSL_SAFERTOS) /* do nothing */ #elif defined(EBSNET) /* do nothing */ #elif defined(FREESCALE_MQX) /* do nothing */ -#elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_MDK5) +#elif defined(WOLFSSL_MDK_ARM) + #if defined(WOLFSSL_MDK5) #include "cmsis_os.h" #else #include #endif -#elif defined(CYASSL_CMSIS_RTOS) +#elif defined(WOLFSSL_CMSIS_RTOS) #include "cmsis_os.h" -#elif defined(CYASSL_TIRTOS) +#elif defined(WOLFSSL_TIRTOS) #include #include #else #ifndef SINGLE_THREADED - #define CYASSL_PTHREADS + #define WOLFSSL_PTHREADS #include #endif #if defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS) @@ -77,47 +77,47 @@ #ifdef SINGLE_THREADED - typedef int CyaSSL_Mutex; + typedef int wolfSSL_Mutex; #else /* MULTI_THREADED */ /* FREERTOS comes first to enable use of FreeRTOS Windows simulator only */ #ifdef FREERTOS - typedef xSemaphoreHandle CyaSSL_Mutex; - #elif defined(CYASSL_SAFERTOS) - typedef struct CyaSSL_Mutex { + typedef xSemaphoreHandle wolfSSL_Mutex; + #elif defined(WOLFSSL_SAFERTOS) + typedef struct wolfSSL_Mutex { signed char mutexBuffer[portQUEUE_OVERHEAD_BYTES]; xSemaphoreHandle mutex; - } CyaSSL_Mutex; + } wolfSSL_Mutex; #elif defined(USE_WINDOWS_API) - typedef CRITICAL_SECTION CyaSSL_Mutex; - #elif defined(CYASSL_PTHREADS) - typedef pthread_mutex_t CyaSSL_Mutex; + typedef CRITICAL_SECTION wolfSSL_Mutex; + #elif defined(WOLFSSL_PTHREADS) + typedef pthread_mutex_t wolfSSL_Mutex; #elif defined(THREADX) - typedef TX_MUTEX CyaSSL_Mutex; + typedef TX_MUTEX wolfSSL_Mutex; #elif defined(MICRIUM) - typedef OS_MUTEX CyaSSL_Mutex; + typedef OS_MUTEX wolfSSL_Mutex; #elif defined(EBSNET) - typedef RTP_MUTEX CyaSSL_Mutex; + typedef RTP_MUTEX wolfSSL_Mutex; #elif defined(FREESCALE_MQX) - typedef MUTEX_STRUCT CyaSSL_Mutex; - #elif defined(CYASSL_MDK_ARM) - #if defined(CYASSL_CMSIS_RTOS) - typedef osMutexId CyaSSL_Mutex; + typedef MUTEX_STRUCT wolfSSL_Mutex; + #elif defined(WOLFSSL_MDK_ARM) + #if defined(WOLFSSL_CMSIS_RTOS) + typedef osMutexId wolfSSL_Mutex; #else - typedef OS_MUT CyaSSL_Mutex; + typedef OS_MUT wolfSSL_Mutex; #endif - #elif defined(CYASSL_CMSIS_RTOS) - typedef osMutexId CyaSSL_Mutex; - #elif defined(CYASSL_TIRTOS) - typedef ti_sysbios_knl_Semaphore_Handle CyaSSL_Mutex; + #elif defined(WOLFSSL_CMSIS_RTOS) + typedef osMutexId wolfSSL_Mutex; + #elif defined(WOLFSSL_TIRTOS) + typedef ti_sysbios_knl_Semaphore_Handle wolfSSL_Mutex; #else #error Need a mutex type in multithreaded mode #endif /* USE_WINDOWS_API */ #endif /* SINGLE_THREADED */ -CYASSL_LOCAL int InitMutex(CyaSSL_Mutex*); -CYASSL_LOCAL int FreeMutex(CyaSSL_Mutex*); -CYASSL_LOCAL int LockMutex(CyaSSL_Mutex*); -CYASSL_LOCAL int UnLockMutex(CyaSSL_Mutex*); +WOLFSSL_LOCAL int InitMutex(wolfSSL_Mutex*); +WOLFSSL_LOCAL int FreeMutex(wolfSSL_Mutex*); +WOLFSSL_LOCAL int LockMutex(wolfSSL_Mutex*); +WOLFSSL_LOCAL int UnLockMutex(wolfSSL_Mutex*); /* filesystem abstraction layer, used by ssl.c */ @@ -172,10 +172,10 @@ CYASSL_LOCAL int UnLockMutex(CyaSSL_Mutex*); #else /* stdio, default case */ #define XFILE FILE* - #if defined(CYASSL_MDK_ARM) + #if defined(WOLFSSL_MDK_ARM) #include - extern FILE * CyaSSL_fopen(const char *name, const char *mode) ; - #define XFOPEN CyaSSL_fopen + extern FILE * wolfSSL_fopen(const char *name, const char *mode) ; + #define XFOPEN wolfSSL_fopen #else #define XFOPEN fopen #endif @@ -196,5 +196,5 @@ CYASSL_LOCAL int UnLockMutex(CyaSSL_Mutex*); } /* extern "C" */ #endif -#endif /* CTAO_CRYPT_PORT_H */ +#endif /* WOLF_CRYPT_PORT_H */