From fb6d6716294de9997fdcbcd1e56fce868dd46ffd Mon Sep 17 00:00:00 2001 From: toddouska Date: Tue, 25 Mar 2014 11:39:07 -0700 Subject: [PATCH] resolve pull request merge conflict --- IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c | 2 +- ctaocrypt/ctaocrypt.vcproj | 2 +- ctaocrypt/src/aes.c | 3 ++- ctaocrypt/src/asn.c | 2 +- ctaocrypt/src/camellia.c | 2 +- ctaocrypt/src/coding.c | 2 +- ctaocrypt/src/compress.c | 2 +- ctaocrypt/src/dh.c | 2 +- ctaocrypt/src/dsa.c | 2 +- ctaocrypt/src/ecc.c | 2 +- ctaocrypt/src/error.c | 2 +- ctaocrypt/src/hc128.c | 2 +- ctaocrypt/src/hmac.c | 2 +- ctaocrypt/src/logging.c | 2 +- ctaocrypt/src/memory.c | 2 +- ctaocrypt/src/pkcs7.c | 2 +- ctaocrypt/src/port.c | 4 ++-- ctaocrypt/src/pwdbased.c | 2 +- ctaocrypt/src/rabbit.c | 2 +- ctaocrypt/src/random.c | 2 +- ctaocrypt/src/rsa.c | 2 +- cyassl/ctaocrypt/{error.h => error-crypt.h} | 3 ++- cyassl/ctaocrypt/include.am | 2 +- cyassl/ctaocrypt/port.h | 4 ++++ cyassl/ctaocrypt/settings.h | 10 ++++++++-- cyassl/{error.h => error-ssl.h} | 5 +++-- cyassl/include.am | 2 +- cyassl/internal.h | 2 ++ mcapi/crypto.c | 2 +- rpm/spec.in | 4 ++-- src/crl.c | 2 +- src/internal.c | 2 +- src/io.c | 2 +- src/keys.c | 2 +- src/ocsp.c | 2 +- src/sniffer.c | 2 +- src/ssl.c | 2 +- src/tls.c | 2 +- 38 files changed, 55 insertions(+), 40 deletions(-) rename cyassl/ctaocrypt/{error.h => error-crypt.h} (99%) rename cyassl/{error.h => error-ssl.h} (98%) diff --git a/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c b/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c index 261fa2edc..c712a33ec 100644 --- a/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c +++ b/IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include Signer* GetCA(void* vp, byte* hash) diff --git a/ctaocrypt/ctaocrypt.vcproj b/ctaocrypt/ctaocrypt.vcproj index fd6856498..2ae9046d5 100755 --- a/ctaocrypt/ctaocrypt.vcproj +++ b/ctaocrypt/ctaocrypt.vcproj @@ -177,7 +177,7 @@ > -#include +#include #include #ifdef NO_INLINE #include @@ -3493,3 +3493,4 @@ static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in, #endif /* NO_AES */ + diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index b492d2151..0bd39c510 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/ctaocrypt/src/camellia.c b/ctaocrypt/src/camellia.c index ecc2c937f..2315b63b7 100644 --- a/ctaocrypt/src/camellia.c +++ b/ctaocrypt/src/camellia.c @@ -61,7 +61,7 @@ #ifdef HAVE_CAMELLIA #include -#include +#include #include #ifdef NO_INLINE #include diff --git a/ctaocrypt/src/coding.c b/ctaocrypt/src/coding.c index 6ccff9e9f..4aebe20dc 100644 --- a/ctaocrypt/src/coding.c +++ b/ctaocrypt/src/coding.c @@ -28,7 +28,7 @@ #ifndef NO_CODING #include -#include +#include #include diff --git a/ctaocrypt/src/compress.c b/ctaocrypt/src/compress.c index 80b612d1a..0c3834f5d 100644 --- a/ctaocrypt/src/compress.c +++ b/ctaocrypt/src/compress.c @@ -30,7 +30,7 @@ #include -#include +#include #include #ifdef NO_INLINE #include diff --git a/ctaocrypt/src/dh.c b/ctaocrypt/src/dh.c index f1d156fd2..ff23ffd74 100644 --- a/ctaocrypt/src/dh.c +++ b/ctaocrypt/src/dh.c @@ -28,7 +28,7 @@ #ifndef NO_DH #include -#include +#include #ifndef USER_MATH_LIB #include diff --git a/ctaocrypt/src/dsa.c b/ctaocrypt/src/dsa.c index 9bf031a66..4dcba291e 100644 --- a/ctaocrypt/src/dsa.c +++ b/ctaocrypt/src/dsa.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include enum { diff --git a/ctaocrypt/src/ecc.c b/ctaocrypt/src/ecc.c index bf21125f3..e572d5832 100644 --- a/ctaocrypt/src/ecc.c +++ b/ctaocrypt/src/ecc.c @@ -31,7 +31,7 @@ #include #include -#include +#include #ifdef HAVE_ECC_ENCRYPT #include diff --git a/ctaocrypt/src/error.c b/ctaocrypt/src/error.c index 67b49e42d..16cb6beba 100644 --- a/ctaocrypt/src/error.c +++ b/ctaocrypt/src/error.c @@ -25,7 +25,7 @@ #include -#include +#include #ifdef _MSC_VER /* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */ diff --git a/ctaocrypt/src/hc128.c b/ctaocrypt/src/hc128.c index a28453247..b76288236 100644 --- a/ctaocrypt/src/hc128.c +++ b/ctaocrypt/src/hc128.c @@ -28,7 +28,7 @@ #ifdef HAVE_HC128 #include -#include +#include #include #ifdef NO_INLINE #include diff --git a/ctaocrypt/src/hmac.c b/ctaocrypt/src/hmac.c index 25c867997..e397aa8ab 100644 --- a/ctaocrypt/src/hmac.c +++ b/ctaocrypt/src/hmac.c @@ -44,7 +44,7 @@ #endif #include -#include +#include #ifdef HAVE_CAVIUM diff --git a/ctaocrypt/src/logging.c b/ctaocrypt/src/logging.c index 061fe6273..8f450ab0a 100644 --- a/ctaocrypt/src/logging.c +++ b/ctaocrypt/src/logging.c @@ -28,7 +28,7 @@ /* submitted by eof */ #include -#include +#include #ifdef __cplusplus diff --git a/ctaocrypt/src/memory.c b/ctaocrypt/src/memory.c index 5e8f193d9..a0a993921 100644 --- a/ctaocrypt/src/memory.c +++ b/ctaocrypt/src/memory.c @@ -28,7 +28,7 @@ #ifdef USE_CYASSL_MEMORY #include -#include +#include #ifdef CYASSL_MALLOC_CHECK #include diff --git a/ctaocrypt/src/pkcs7.c b/ctaocrypt/src/pkcs7.c index de55e2b03..cb43e45be 100644 --- a/ctaocrypt/src/pkcs7.c +++ b/ctaocrypt/src/pkcs7.c @@ -28,7 +28,7 @@ #ifdef HAVE_PKCS7 #include -#include +#include #include #ifndef min diff --git a/ctaocrypt/src/port.c b/ctaocrypt/src/port.c index ea9b78d4b..87efc5bdc 100644 --- a/ctaocrypt/src/port.c +++ b/ctaocrypt/src/port.c @@ -25,7 +25,7 @@ #include #include -#include +#include #ifdef _MSC_VER @@ -352,7 +352,7 @@ int UnLockMutex(CyaSSL_Mutex *m) return BAD_MUTEX_E; } - #elif defined(CYASSL_MDK_ARM) + #elif defined(CYASSL_MDK_ARM)|| defined(CYASSL_CMSIS_RTOS) #if defined(CYASSL_CMSIS_RTOS) #include "cmsis_os.h" diff --git a/ctaocrypt/src/pwdbased.c b/ctaocrypt/src/pwdbased.c index 6152292ca..ece0a2c68 100644 --- a/ctaocrypt/src/pwdbased.c +++ b/ctaocrypt/src/pwdbased.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #if defined(CYASSL_SHA512) || defined(CYASSL_SHA384) #include #endif diff --git a/ctaocrypt/src/rabbit.c b/ctaocrypt/src/rabbit.c index 947ac201a..061bc05ff 100644 --- a/ctaocrypt/src/rabbit.c +++ b/ctaocrypt/src/rabbit.c @@ -28,7 +28,7 @@ #ifndef NO_RABBIT #include -#include +#include #include #ifdef NO_INLINE #include diff --git a/ctaocrypt/src/random.c b/ctaocrypt/src/random.c index 74cf2d6ce..4406d6713 100644 --- a/ctaocrypt/src/random.c +++ b/ctaocrypt/src/random.c @@ -31,7 +31,7 @@ */ #include -#include +#include #ifdef NO_RC4 #include diff --git a/ctaocrypt/src/rsa.c b/ctaocrypt/src/rsa.c index 22b9094a2..1765018f1 100644 --- a/ctaocrypt/src/rsa.c +++ b/ctaocrypt/src/rsa.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #ifdef SHOW_GEN diff --git a/cyassl/ctaocrypt/error.h b/cyassl/ctaocrypt/error-crypt.h similarity index 99% rename from cyassl/ctaocrypt/error.h rename to cyassl/ctaocrypt/error-crypt.h index 185b4c864..2bf246e83 100644 --- a/cyassl/ctaocrypt/error.h +++ b/cyassl/ctaocrypt/error-crypt.h @@ -1,4 +1,4 @@ -/* error.h +/* error-crypt.h * * Copyright (C) 2006-2013 wolfSSL Inc. * @@ -136,3 +136,4 @@ CYASSL_API void CTaoCryptErrorString(int err, char* buff); #endif /* CTAO_CRYPT_ERROR_H */ + diff --git a/cyassl/ctaocrypt/include.am b/cyassl/ctaocrypt/include.am index 9206435a4..8165af42c 100644 --- a/cyassl/ctaocrypt/include.am +++ b/cyassl/ctaocrypt/include.am @@ -13,7 +13,7 @@ nobase_include_HEADERS+= \ cyassl/ctaocrypt/dh.h \ cyassl/ctaocrypt/dsa.h \ cyassl/ctaocrypt/ecc.h \ - cyassl/ctaocrypt/error.h \ + cyassl/ctaocrypt/error-crypt.h \ cyassl/ctaocrypt/fips_test.h \ cyassl/ctaocrypt/hc128.h \ cyassl/ctaocrypt/hmac.h \ diff --git a/cyassl/ctaocrypt/port.h b/cyassl/ctaocrypt/port.h index 5741c255e..1f06c20e6 100644 --- a/cyassl/ctaocrypt/port.h +++ b/cyassl/ctaocrypt/port.h @@ -60,6 +60,8 @@ #else #include #endif +#elif defined(CYASSL_CMSIS_RTOS) + #include "cmsis_os.h" #else #ifndef SINGLE_THREADED #define CYASSL_PTHREADS @@ -100,6 +102,8 @@ #else typedef OS_MUT CyaSSL_Mutex; #endif + #elif defined(CYASSL_CMSIS_RTOS) + typedef osMutexId CyaSSL_Mutex; #else #error Need a mutex type in multithreaded mode #endif /* USE_WINDOWS_API */ diff --git a/cyassl/ctaocrypt/settings.h b/cyassl/ctaocrypt/settings.h index 22bec0ecf..66165a188 100644 --- a/cyassl/ctaocrypt/settings.h +++ b/cyassl/ctaocrypt/settings.h @@ -167,15 +167,21 @@ #endif #ifdef MBED - #define SINGLE_THREADED + //#define SINGLE_THREADED #define CYASSL_USER_IO + #define NO_FILESYSTEM + #define NO_CERT + #define USE_CERT_BUFFERS_1024 #define NO_WRITEV #define NO_DEV_RANDOM #define NO_SHA512 #define NO_DH #define NO_DSA #define NO_HC128 -#endif /* MBED */ + #define HAVE_ECC + #define NO_SESSION_CACHE + #define CYASSL_CMSIS_RTOS +#endif #ifdef CYASSL_TYTO #include "rand.h" diff --git a/cyassl/error.h b/cyassl/error-ssl.h similarity index 98% rename from cyassl/error.h rename to cyassl/error-ssl.h index e32df7b6e..71f4b4ffd 100644 --- a/cyassl/error.h +++ b/cyassl/error-ssl.h @@ -1,4 +1,4 @@ -/* error.h +/* error-ssl.h * * Copyright (C) 2006-2013 wolfSSL Inc. * @@ -23,7 +23,7 @@ #ifndef CYASSL_ERROR_H #define CYASSL_ERROR_H -#include /* pull in CTaoCrypt errors */ +#include /* pull in CTaoCrypt errors */ #ifdef __cplusplus extern "C" { @@ -143,3 +143,4 @@ void SetErrorString(int err, char* buff); #endif /* CyaSSL_ERROR_H */ + diff --git a/cyassl/include.am b/cyassl/include.am index 9784ab249..db1f089ee 100644 --- a/cyassl/include.am +++ b/cyassl/include.am @@ -8,7 +8,7 @@ include cyassl/openssl/include.am EXTRA_DIST+= cyassl/sniffer_error.rc nobase_include_HEADERS+= \ - cyassl/error.h \ + cyassl/error-ssl.h \ cyassl/ssl.h \ cyassl/sniffer_error.h \ cyassl/sniffer.h \ diff --git a/cyassl/internal.h b/cyassl/internal.h index 7c6abd5ad..e9357a52f 100644 --- a/cyassl/internal.h +++ b/cyassl/internal.h @@ -95,6 +95,8 @@ #else #include #endif +#elif defined(MBED) + #else #ifndef SINGLE_THREADED #define CYASSL_PTHREADS diff --git a/mcapi/crypto.c b/mcapi/crypto.c index 1557ac93e..52a4c4fbb 100644 --- a/mcapi/crypto.c +++ b/mcapi/crypto.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include /* Initialize MD5 */ diff --git a/rpm/spec.in b/rpm/spec.in index 4ea152a32..e1ca1c99e 100644 --- a/rpm/spec.in +++ b/rpm/spec.in @@ -92,7 +92,7 @@ mkdir -p $RPM_BUILD_ROOT/ %{_includedir}/cyassl/ctaocrypt/dh.h %{_includedir}/cyassl/ctaocrypt/dsa.h %{_includedir}/cyassl/ctaocrypt/ecc.h -%{_includedir}/cyassl/ctaocrypt/error.h +%{_includedir}/cyassl/ctaocrypt/error-crypt.h %{_includedir}/cyassl/ctaocrypt/hc128.h %{_includedir}/cyassl/ctaocrypt/hmac.h %{_includedir}/cyassl/ctaocrypt/integer.h @@ -118,7 +118,7 @@ mkdir -p $RPM_BUILD_ROOT/ %{_includedir}/cyassl/ctaocrypt/tfm.h %{_includedir}/cyassl/ctaocrypt/types.h %{_includedir}/cyassl/ctaocrypt/visibility.h -%{_includedir}/cyassl/error.h +%{_includedir}/cyassl/error-ssl.h %{_includedir}/cyassl/ocsp.h %{_includedir}/cyassl/openssl/asn1.h %{_includedir}/cyassl/openssl/bio.h diff --git a/src/crl.c b/src/crl.c index 1c75ed81e..9536be18f 100644 --- a/src/crl.c +++ b/src/crl.c @@ -28,7 +28,7 @@ #ifdef HAVE_CRL #include -#include +#include #include #include diff --git a/src/internal.c b/src/internal.c index f29aab589..576b7567d 100644 --- a/src/internal.c +++ b/src/internal.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #ifdef HAVE_LIBZ diff --git a/src/io.c b/src/io.c index 55f28eed3..a3a7668b8 100644 --- a/src/io.c +++ b/src/io.c @@ -31,7 +31,7 @@ #endif #include -#include +#include /* if user writes own I/O callbacks they can define CYASSL_USER_IO to remove automatic setting of default I/O functions EmbedSend() and EmbedReceive() diff --git a/src/keys.c b/src/keys.c index b9c296c30..caac52948 100644 --- a/src/keys.c +++ b/src/keys.c @@ -27,7 +27,7 @@ #include #include -#include +#include #ifdef SHOW_SECRETS #ifdef FREESCALE_MQX #include diff --git a/src/ocsp.c b/src/ocsp.c index cb55c4e04..bccb7f8cf 100644 --- a/src/ocsp.c +++ b/src/ocsp.c @@ -27,7 +27,7 @@ #ifdef HAVE_OCSP -#include +#include #include #include diff --git a/src/sniffer.c b/src/sniffer.c index da9f2c607..8333bf7a3 100644 --- a/src/sniffer.c +++ b/src/sniffer.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/src/ssl.c b/src/ssl.c index 1db78f8e5..58f1c64ba 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) diff --git a/src/tls.c b/src/tls.c index cd6f96edd..5d3015ae4 100644 --- a/src/tls.c +++ b/src/tls.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include