forked from wolfSSL/wolfssl
Merge branch 'master' of github.com:cyassl/cyassl
This commit is contained in:
17
.gitignore
vendored
17
.gitignore
vendored
@@ -100,3 +100,20 @@ IDE\MDK-ARM\LPC43xx\LPC43xx/
|
|||||||
*.gcno
|
*.gcno
|
||||||
*.gcda
|
*.gcda
|
||||||
*.gcov
|
*.gcov
|
||||||
|
|
||||||
|
# MPLAB Generated Files (OS X)
|
||||||
|
mcapi/ctaocrypt_mcapi.X/nbproject/Makefile-*
|
||||||
|
mcapi/ctaocrypt_mcapi.X/nbproject/Package-default.bash
|
||||||
|
mcapi/ctaocrypt_test.X/nbproject/Makefile-*
|
||||||
|
mcapi/ctaocrypt_test.X/nbproject/Package-default.bash
|
||||||
|
mcapi/cyassl.X/nbproject/Makefile-*
|
||||||
|
mcapi/cyassl.X/nbproject/Package-default.bash
|
||||||
|
mcapi/zlib.X/nbproject/Makefile-*
|
||||||
|
mcapi/zlib.X/nbproject/Package-default.bash
|
||||||
|
mplabx/ctaocrypt_benchmark.X/nbproject/Makefile-*
|
||||||
|
mplabx/ctaocrypt_benchmark.X/nbproject/Package-default.bash
|
||||||
|
mplabx/ctaocrypt_test.X/nbproject/Makefile-*
|
||||||
|
mplabx/ctaocrypt_test.X/nbproject/Package-default.bash
|
||||||
|
mplabx/cyassl.X/nbproject/Makefile-*
|
||||||
|
mplabx/cyassl.X/nbproject/Package-default.bash
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <cyassl/ssl.h>
|
#include <cyassl/ssl.h>
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
#include <cyassl/ctaocrypt/coding.h>
|
#include <cyassl/ctaocrypt/coding.h>
|
||||||
|
|
||||||
Signer* GetCA(void* vp, byte* hash)
|
Signer* GetCA(void* vp, byte* hash)
|
||||||
|
@@ -177,7 +177,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\error.h"
|
RelativePath=".\include\error-crypt.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/aes.h>
|
#include <cyassl/ctaocrypt/aes.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
#ifdef NO_INLINE
|
#ifdef NO_INLINE
|
||||||
#include <cyassl/ctaocrypt/misc.h>
|
#include <cyassl/ctaocrypt/misc.h>
|
||||||
@@ -3493,3 +3493,4 @@ static int AesCaviumCbcDecrypt(Aes* aes, byte* out, const byte* in,
|
|||||||
|
|
||||||
#endif /* NO_AES */
|
#endif /* NO_AES */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
#include <cyassl/ctaocrypt/sha.h>
|
#include <cyassl/ctaocrypt/sha.h>
|
||||||
#include <cyassl/ctaocrypt/md5.h>
|
#include <cyassl/ctaocrypt/md5.h>
|
||||||
#include <cyassl/ctaocrypt/md2.h>
|
#include <cyassl/ctaocrypt/md2.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/pwdbased.h>
|
#include <cyassl/ctaocrypt/pwdbased.h>
|
||||||
#include <cyassl/ctaocrypt/des3.h>
|
#include <cyassl/ctaocrypt/des3.h>
|
||||||
#include <cyassl/ctaocrypt/sha256.h>
|
#include <cyassl/ctaocrypt/sha256.h>
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
#ifdef HAVE_CAMELLIA
|
#ifdef HAVE_CAMELLIA
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/camellia.h>
|
#include <cyassl/ctaocrypt/camellia.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
#ifdef NO_INLINE
|
#ifdef NO_INLINE
|
||||||
#include <cyassl/ctaocrypt/misc.h>
|
#include <cyassl/ctaocrypt/misc.h>
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifndef NO_CODING
|
#ifndef NO_CODING
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/coding.h>
|
#include <cyassl/ctaocrypt/coding.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/compress.h>
|
#include <cyassl/ctaocrypt/compress.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
#ifdef NO_INLINE
|
#ifdef NO_INLINE
|
||||||
#include <cyassl/ctaocrypt/misc.h>
|
#include <cyassl/ctaocrypt/misc.h>
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifndef NO_DH
|
#ifndef NO_DH
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/dh.h>
|
#include <cyassl/ctaocrypt/dh.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
#ifndef USER_MATH_LIB
|
#ifndef USER_MATH_LIB
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <cyassl/ctaocrypt/dsa.h>
|
#include <cyassl/ctaocrypt/dsa.h>
|
||||||
#include <cyassl/ctaocrypt/sha.h>
|
#include <cyassl/ctaocrypt/sha.h>
|
||||||
#include <cyassl/ctaocrypt/random.h>
|
#include <cyassl/ctaocrypt/random.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <cyassl/ctaocrypt/ecc.h>
|
#include <cyassl/ctaocrypt/ecc.h>
|
||||||
#include <cyassl/ctaocrypt/asn.h>
|
#include <cyassl/ctaocrypt/asn.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
#ifdef HAVE_ECC_ENCRYPT
|
#ifdef HAVE_ECC_ENCRYPT
|
||||||
#include <cyassl/ctaocrypt/hmac.h>
|
#include <cyassl/ctaocrypt/hmac.h>
|
||||||
@@ -3658,17 +3658,27 @@ static void ecc_ctx_init(ecEncCtx* ctx, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* allow ecc context reset so user doesn't have to init/free for resue */
|
||||||
|
int ecc_ctx_reset(ecEncCtx* ctx, RNG* rng)
|
||||||
|
{
|
||||||
|
if (ctx == NULL || rng == NULL)
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
|
ecc_ctx_init(ctx, ctx->protocol);
|
||||||
|
return ecc_ctx_set_salt(ctx, ctx->protocol, rng);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* alloc/init and set defaults, return new Context */
|
/* alloc/init and set defaults, return new Context */
|
||||||
ecEncCtx* ecc_ctx_new(int flags, RNG* rng)
|
ecEncCtx* ecc_ctx_new(int flags, RNG* rng)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
ecEncCtx* ctx = (ecEncCtx*)XMALLOC(sizeof(ecEncCtx), 0, DYNAMIC_TYPE_ECC);
|
ecEncCtx* ctx = (ecEncCtx*)XMALLOC(sizeof(ecEncCtx), 0, DYNAMIC_TYPE_ECC);
|
||||||
|
|
||||||
ecc_ctx_init(ctx, flags);
|
if (ctx)
|
||||||
|
ctx->protocol = (byte)flags;
|
||||||
if (ctx && flags)
|
|
||||||
ret = ecc_ctx_set_salt(ctx, flags, rng);
|
|
||||||
|
|
||||||
|
ret = ecc_ctx_reset(ctx, rng);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ecc_ctx_free(ctx);
|
ecc_ctx_free(ctx);
|
||||||
ctx = NULL;
|
ctx = NULL;
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <cyassl/ctaocrypt/settings.h>
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
/* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */
|
/* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifdef HAVE_HC128
|
#ifdef HAVE_HC128
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/hc128.h>
|
#include <cyassl/ctaocrypt/hc128.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
#ifdef NO_INLINE
|
#ifdef NO_INLINE
|
||||||
#include <cyassl/ctaocrypt/hc128.h>
|
#include <cyassl/ctaocrypt/hc128.h>
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/hmac.h>
|
#include <cyassl/ctaocrypt/hmac.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_CAVIUM
|
#ifdef HAVE_CAVIUM
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
/* submitted by eof */
|
/* submitted by eof */
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifdef USE_CYASSL_MEMORY
|
#ifdef USE_CYASSL_MEMORY
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/memory.h>
|
#include <cyassl/ctaocrypt/memory.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
#ifdef CYASSL_MALLOC_CHECK
|
#ifdef CYASSL_MALLOC_CHECK
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifdef HAVE_PKCS7
|
#ifdef HAVE_PKCS7
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/pkcs7.h>
|
#include <cyassl/ctaocrypt/pkcs7.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
|
|
||||||
#ifndef min
|
#ifndef min
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <cyassl/ctaocrypt/settings.h>
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
#include <cyassl/ctaocrypt/types.h>
|
#include <cyassl/ctaocrypt/types.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
@@ -352,7 +352,7 @@ int UnLockMutex(CyaSSL_Mutex *m)
|
|||||||
return BAD_MUTEX_E;
|
return BAD_MUTEX_E;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(CYASSL_MDK_ARM)
|
#elif defined(CYASSL_MDK_ARM)|| defined(CYASSL_CMSIS_RTOS)
|
||||||
|
|
||||||
#if defined(CYASSL_CMSIS_RTOS)
|
#if defined(CYASSL_CMSIS_RTOS)
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
@@ -46,7 +46,7 @@
|
|||||||
#include <cyassl/ctaocrypt/pwdbased.h>
|
#include <cyassl/ctaocrypt/pwdbased.h>
|
||||||
#include <cyassl/ctaocrypt/hmac.h>
|
#include <cyassl/ctaocrypt/hmac.h>
|
||||||
#include <cyassl/ctaocrypt/integer.h>
|
#include <cyassl/ctaocrypt/integer.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#if defined(CYASSL_SHA512) || defined(CYASSL_SHA384)
|
#if defined(CYASSL_SHA512) || defined(CYASSL_SHA384)
|
||||||
#include <cyassl/ctaocrypt/sha512.h>
|
#include <cyassl/ctaocrypt/sha512.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifndef NO_RABBIT
|
#ifndef NO_RABBIT
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/rabbit.h>
|
#include <cyassl/ctaocrypt/rabbit.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
#ifdef NO_INLINE
|
#ifdef NO_INLINE
|
||||||
#include <cyassl/ctaocrypt/misc.h>
|
#include <cyassl/ctaocrypt/misc.h>
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/random.h>
|
#include <cyassl/ctaocrypt/random.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
#ifdef NO_RC4
|
#ifdef NO_RC4
|
||||||
#include <cyassl/ctaocrypt/sha256.h>
|
#include <cyassl/ctaocrypt/sha256.h>
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <cyassl/ctaocrypt/rsa.h>
|
#include <cyassl/ctaocrypt/rsa.h>
|
||||||
#include <cyassl/ctaocrypt/random.h>
|
#include <cyassl/ctaocrypt/random.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.h>
|
#include <cyassl/ctaocrypt/logging.h>
|
||||||
|
|
||||||
#ifdef SHOW_GEN
|
#ifdef SHOW_GEN
|
||||||
|
@@ -157,6 +157,8 @@ CYASSL_API
|
|||||||
ecEncCtx* ecc_ctx_new(int flags, RNG* rng);
|
ecEncCtx* ecc_ctx_new(int flags, RNG* rng);
|
||||||
CYASSL_API
|
CYASSL_API
|
||||||
void ecc_ctx_free(ecEncCtx*);
|
void ecc_ctx_free(ecEncCtx*);
|
||||||
|
CYASSL_API
|
||||||
|
int ecc_ctx_reset(ecEncCtx*, RNG*); /* reset for use again w/o alloc/free */
|
||||||
|
|
||||||
CYASSL_API
|
CYASSL_API
|
||||||
const byte* ecc_ctx_get_own_salt(ecEncCtx*);
|
const byte* ecc_ctx_get_own_salt(ecEncCtx*);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* error.h
|
/* error-crypt.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2013 wolfSSL Inc.
|
* Copyright (C) 2006-2013 wolfSSL Inc.
|
||||||
*
|
*
|
||||||
@@ -136,3 +136,4 @@ CYASSL_API void CTaoCryptErrorString(int err, char* buff);
|
|||||||
|
|
||||||
#endif /* CTAO_CRYPT_ERROR_H */
|
#endif /* CTAO_CRYPT_ERROR_H */
|
||||||
|
|
||||||
|
|
@@ -13,7 +13,7 @@ nobase_include_HEADERS+= \
|
|||||||
cyassl/ctaocrypt/dh.h \
|
cyassl/ctaocrypt/dh.h \
|
||||||
cyassl/ctaocrypt/dsa.h \
|
cyassl/ctaocrypt/dsa.h \
|
||||||
cyassl/ctaocrypt/ecc.h \
|
cyassl/ctaocrypt/ecc.h \
|
||||||
cyassl/ctaocrypt/error.h \
|
cyassl/ctaocrypt/error-crypt.h \
|
||||||
cyassl/ctaocrypt/fips_test.h \
|
cyassl/ctaocrypt/fips_test.h \
|
||||||
cyassl/ctaocrypt/hc128.h \
|
cyassl/ctaocrypt/hc128.h \
|
||||||
cyassl/ctaocrypt/hmac.h \
|
cyassl/ctaocrypt/hmac.h \
|
||||||
|
@@ -60,6 +60,8 @@
|
|||||||
#else
|
#else
|
||||||
#include <rtl.h>
|
#include <rtl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(CYASSL_CMSIS_RTOS)
|
||||||
|
#include "cmsis_os.h"
|
||||||
#else
|
#else
|
||||||
#ifndef SINGLE_THREADED
|
#ifndef SINGLE_THREADED
|
||||||
#define CYASSL_PTHREADS
|
#define CYASSL_PTHREADS
|
||||||
@@ -100,6 +102,8 @@
|
|||||||
#else
|
#else
|
||||||
typedef OS_MUT CyaSSL_Mutex;
|
typedef OS_MUT CyaSSL_Mutex;
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(CYASSL_CMSIS_RTOS)
|
||||||
|
typedef osMutexId CyaSSL_Mutex;
|
||||||
#else
|
#else
|
||||||
#error Need a mutex type in multithreaded mode
|
#error Need a mutex type in multithreaded mode
|
||||||
#endif /* USE_WINDOWS_API */
|
#endif /* USE_WINDOWS_API */
|
||||||
|
@@ -167,20 +167,26 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MBED
|
#ifdef MBED
|
||||||
#define SINGLE_THREADED
|
|
||||||
#define CYASSL_USER_IO
|
#define CYASSL_USER_IO
|
||||||
|
#define NO_FILESYSTEM
|
||||||
|
#define NO_CERT
|
||||||
|
#define USE_CERT_BUFFERS_1024
|
||||||
#define NO_WRITEV
|
#define NO_WRITEV
|
||||||
#define NO_DEV_RANDOM
|
#define NO_DEV_RANDOM
|
||||||
#define NO_SHA512
|
#define NO_SHA512
|
||||||
#define NO_DH
|
#define NO_DH
|
||||||
#define NO_DSA
|
#define NO_DSA
|
||||||
#define NO_HC128
|
#define NO_HC128
|
||||||
#endif /* MBED */
|
#define HAVE_ECC
|
||||||
|
#define NO_SESSION_CACHE
|
||||||
|
#define CYASSL_CMSIS_RTOS
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CYASSL_TYTO
|
#ifdef CYASSL_TYTO
|
||||||
#include "rand.h"
|
#include "rand.h"
|
||||||
#define FREERTOS
|
#define FREERTOS
|
||||||
#define NO_FILESYSTEM
|
#define NO_FILESYSTEM
|
||||||
|
#define NO_MAIN_DRIVER
|
||||||
#define CYASSL_USER_IO
|
#define CYASSL_USER_IO
|
||||||
#define NO_DEV_RANDOM
|
#define NO_DEV_RANDOM
|
||||||
#define HAVE_ECC
|
#define HAVE_ECC
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* error.h
|
/* error-ssl.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2013 wolfSSL Inc.
|
* Copyright (C) 2006-2013 wolfSSL Inc.
|
||||||
*
|
*
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
#ifndef CYASSL_ERROR_H
|
#ifndef CYASSL_ERROR_H
|
||||||
#define CYASSL_ERROR_H
|
#define CYASSL_ERROR_H
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/error.h> /* pull in CTaoCrypt errors */
|
#include <cyassl/ctaocrypt/error-crypt.h> /* pull in CTaoCrypt errors */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -143,3 +143,4 @@ void SetErrorString(int err, char* buff);
|
|||||||
|
|
||||||
#endif /* CyaSSL_ERROR_H */
|
#endif /* CyaSSL_ERROR_H */
|
||||||
|
|
||||||
|
|
@@ -8,7 +8,7 @@ include cyassl/openssl/include.am
|
|||||||
EXTRA_DIST+= cyassl/sniffer_error.rc
|
EXTRA_DIST+= cyassl/sniffer_error.rc
|
||||||
|
|
||||||
nobase_include_HEADERS+= \
|
nobase_include_HEADERS+= \
|
||||||
cyassl/error.h \
|
cyassl/error-ssl.h \
|
||||||
cyassl/ssl.h \
|
cyassl/ssl.h \
|
||||||
cyassl/sniffer_error.h \
|
cyassl/sniffer_error.h \
|
||||||
cyassl/sniffer.h \
|
cyassl/sniffer.h \
|
||||||
|
@@ -95,6 +95,8 @@
|
|||||||
#else
|
#else
|
||||||
#include <rtl.h>
|
#include <rtl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(MBED)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef SINGLE_THREADED
|
#ifndef SINGLE_THREADED
|
||||||
#define CYASSL_PTHREADS
|
#define CYASSL_PTHREADS
|
||||||
|
@@ -55,9 +55,9 @@ Included Project Files
|
|||||||
This project builds the zlib library for use in the ctaocrypt_test.X
|
This project builds the zlib library for use in the ctaocrypt_test.X
|
||||||
and ctaocrypt_mcapi.X projects. This project expects the zlib sources
|
and ctaocrypt_mcapi.X projects. This project expects the zlib sources
|
||||||
to be located under the CyaSSL root directory. Currently it is set up
|
to be located under the CyaSSL root directory. Currently it is set up
|
||||||
to work with zlib 1.2.7, and looks for sources under:
|
to work with zlib 1.2.8, and looks for sources under:
|
||||||
|
|
||||||
<cyassl_root>/zlib-1.2.7
|
<cyassl_root>/zlib-1.2.8
|
||||||
|
|
||||||
PIC32MX/PIC32MZ
|
PIC32MX/PIC32MZ
|
||||||
---------------
|
---------------
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include <cyassl/ctaocrypt/aes.h>
|
#include <cyassl/ctaocrypt/aes.h>
|
||||||
#include <cyassl/ctaocrypt/rsa.h>
|
#include <cyassl/ctaocrypt/rsa.h>
|
||||||
#include <cyassl/ctaocrypt/ecc.h>
|
#include <cyassl/ctaocrypt/ecc.h>
|
||||||
#include <cyassl/ctaocrypt/error.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
|
|
||||||
/* Initialize MD5 */
|
/* Initialize MD5 */
|
||||||
|
@@ -163,7 +163,7 @@ enum {
|
|||||||
|
|
||||||
/* AES */
|
/* AES */
|
||||||
typedef struct CRYPT_AES_CTX {
|
typedef struct CRYPT_AES_CTX {
|
||||||
int holder[69]; /* big enough to hold internal, but check on init */
|
int holder[70]; /* big enough to hold internal, but check on init */
|
||||||
} CRYPT_AES_CTX;
|
} CRYPT_AES_CTX;
|
||||||
|
|
||||||
/* key */
|
/* key */
|
||||||
|
@@ -12,21 +12,21 @@
|
|||||||
<logicalFolder name="SourceFiles"
|
<logicalFolder name="SourceFiles"
|
||||||
displayName="Source Files"
|
displayName="Source Files"
|
||||||
projectFiles="true">
|
projectFiles="true">
|
||||||
<itemPath>../../zlib-1.2.7/adler32.c</itemPath>
|
<itemPath>../../zlib-1.2.8/adler32.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/compress.c</itemPath>
|
<itemPath>../../zlib-1.2.8/compress.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/crc32.c</itemPath>
|
<itemPath>../../zlib-1.2.8/crc32.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/deflate.c</itemPath>
|
<itemPath>../../zlib-1.2.8/deflate.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/gzclose.c</itemPath>
|
<itemPath>../../zlib-1.2.8/gzclose.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/gzlib.c</itemPath>
|
<itemPath>../../zlib-1.2.8/gzlib.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/gzread.c</itemPath>
|
<itemPath>../../zlib-1.2.8/gzread.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/gzwrite.c</itemPath>
|
<itemPath>../../zlib-1.2.8/gzwrite.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/infback.c</itemPath>
|
<itemPath>../../zlib-1.2.8/infback.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/inffast.c</itemPath>
|
<itemPath>../../zlib-1.2.8/inffast.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/inflate.c</itemPath>
|
<itemPath>../../zlib-1.2.8/inflate.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/inftrees.c</itemPath>
|
<itemPath>../../zlib-1.2.8/inftrees.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/trees.c</itemPath>
|
<itemPath>../../zlib-1.2.8/trees.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/uncompr.c</itemPath>
|
<itemPath>../../zlib-1.2.8/uncompr.c</itemPath>
|
||||||
<itemPath>../../zlib-1.2.7/zutil.c</itemPath>
|
<itemPath>../../zlib-1.2.8/zutil.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
@@ -44,8 +44,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.30</languageToolchainVersion>
|
<languageToolchainVersion>1.10</languageToolchainVersion>
|
||||||
<platform>3</platform>
|
<platform>4</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<archiverTool>
|
<archiverTool>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<property key="enable-symbols" value="true"/>
|
<property key="enable-symbols" value="true"/>
|
||||||
<property key="enable-unroll-loops" value="false"/>
|
<property key="enable-unroll-loops" value="false"/>
|
||||||
<property key="exclude-floating-point" value="false"/>
|
<property key="exclude-floating-point" value="false"/>
|
||||||
<property key="extra-include-directories" value="../../zlib-1.2.7"/>
|
<property key="extra-include-directories" value="../../zlib-1.2.8"/>
|
||||||
<property key="generate-16-bit-code" value="false"/>
|
<property key="generate-16-bit-code" value="false"/>
|
||||||
<property key="isolate-each-function" value="false"/>
|
<property key="isolate-each-function" value="false"/>
|
||||||
<property key="make-warnings-into-errors" value="false"/>
|
<property key="make-warnings-into-errors" value="false"/>
|
||||||
@@ -80,7 +80,6 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
<property key="use-iar" value="false"/>
|
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -114,7 +113,6 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
<property key="oXC32ld-extra-opts" value=""/>
|
|
||||||
<property key="optimization-level" value=""/>
|
<property key="optimization-level" value=""/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="false"/>
|
<property key="remove-unused-sections" value="false"/>
|
||||||
@@ -150,8 +148,6 @@
|
|||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
<property key="save-temps" value="false"/>
|
|
||||||
<property key="wpo-lto" value="false"/>
|
|
||||||
</C32Global>
|
</C32Global>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
<property key="whatToProgram" value="all"/>
|
<property key="whatToProgram" value="all"/>
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if defined(CYASSL_MICROCHIP_PIC32MZ)
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -92,7 +92,7 @@ mkdir -p $RPM_BUILD_ROOT/
|
|||||||
%{_includedir}/cyassl/ctaocrypt/dh.h
|
%{_includedir}/cyassl/ctaocrypt/dh.h
|
||||||
%{_includedir}/cyassl/ctaocrypt/dsa.h
|
%{_includedir}/cyassl/ctaocrypt/dsa.h
|
||||||
%{_includedir}/cyassl/ctaocrypt/ecc.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/hc128.h
|
||||||
%{_includedir}/cyassl/ctaocrypt/hmac.h
|
%{_includedir}/cyassl/ctaocrypt/hmac.h
|
||||||
%{_includedir}/cyassl/ctaocrypt/integer.h
|
%{_includedir}/cyassl/ctaocrypt/integer.h
|
||||||
@@ -118,7 +118,7 @@ mkdir -p $RPM_BUILD_ROOT/
|
|||||||
%{_includedir}/cyassl/ctaocrypt/tfm.h
|
%{_includedir}/cyassl/ctaocrypt/tfm.h
|
||||||
%{_includedir}/cyassl/ctaocrypt/types.h
|
%{_includedir}/cyassl/ctaocrypt/types.h
|
||||||
%{_includedir}/cyassl/ctaocrypt/visibility.h
|
%{_includedir}/cyassl/ctaocrypt/visibility.h
|
||||||
%{_includedir}/cyassl/error.h
|
%{_includedir}/cyassl/error-ssl.h
|
||||||
%{_includedir}/cyassl/ocsp.h
|
%{_includedir}/cyassl/ocsp.h
|
||||||
%{_includedir}/cyassl/openssl/asn1.h
|
%{_includedir}/cyassl/openssl/asn1.h
|
||||||
%{_includedir}/cyassl/openssl/bio.h
|
%{_includedir}/cyassl/openssl/bio.h
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifdef HAVE_CRL
|
#ifdef HAVE_CRL
|
||||||
|
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include <cyassl/ctaocrypt/settings.h>
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
|
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
#include <cyassl/ctaocrypt/asn.h>
|
#include <cyassl/ctaocrypt/asn.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBZ
|
#ifdef HAVE_LIBZ
|
||||||
|
2
src/io.c
2
src/io.c
@@ -31,7 +31,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
|
|
||||||
/* if user writes own I/O callbacks they can define CYASSL_USER_IO to remove
|
/* 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()
|
automatic setting of default I/O functions EmbedSend() and EmbedReceive()
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include <cyassl/ctaocrypt/settings.h>
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
|
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
#ifdef SHOW_SECRETS
|
#ifdef SHOW_SECRETS
|
||||||
#ifdef FREESCALE_MQX
|
#ifdef FREESCALE_MQX
|
||||||
#include <fio.h>
|
#include <fio.h>
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_OCSP
|
#ifdef HAVE_OCSP
|
||||||
|
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
#include <cyassl/ocsp.h>
|
#include <cyassl/ocsp.h>
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
#include <cyassl/openssl/ssl.h>
|
#include <cyassl/openssl/ssl.h>
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
#include <cyassl/sniffer.h>
|
#include <cyassl/sniffer.h>
|
||||||
#include <cyassl/sniffer_error.h>
|
#include <cyassl/sniffer_error.h>
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <cyassl/ssl.h>
|
#include <cyassl/ssl.h>
|
||||||
#include <cyassl/internal.h>
|
#include <cyassl/internal.h>
|
||||||
#include <cyassl/error.h>
|
#include <cyassl/error-ssl.h>
|
||||||
#include <cyassl/ctaocrypt/coding.h>
|
#include <cyassl/ctaocrypt/coding.h>
|
||||||
|
|
||||||
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
||||||
|
Reference in New Issue
Block a user