close to build test with --disable-examples option

This commit is contained in:
Jacob Barthelmeh 2014-12-18 15:40:09 -07:00
parent d2a97b035d
commit d958a2f3d6
13 changed files with 56 additions and 89 deletions

View File

@ -472,7 +472,7 @@ AC_ARG_ENABLE([ripemd],
if test "$ENABLED_RIPEMD" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RIPEMD"
fi
AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"])

View File

@ -25,40 +25,7 @@
#ifndef CTAO_CRYPT_RIPEMD_H
#define CTAO_CRYPT_RIPEME_H
#include <cyassl/ctaocrypt/types.h>
#ifdef __cplusplus
extern "C" {
#endif
/* in bytes */
enum {
RIPEMD = 3, /* hash type unique */
RIPEMD_BLOCK_SIZE = 64,
RIPEMD_DIGEST_SIZE = 20,
RIPEMD_PAD_SIZE = 56
};
/* RipeMd 160 digest */
typedef struct RipeMd {
word32 buffLen; /* in bytes */
word32 loLen; /* length in bytes */
word32 hiLen; /* length in bytes */
word32 digest[RIPEMD_DIGEST_SIZE / sizeof(word32)];
word32 buffer[RIPEMD_BLOCK_SIZE / sizeof(word32)];
} RipeMd;
CYASSL_API void InitRipeMd(RipeMd*);
CYASSL_API void RipeMdUpdate(RipeMd*, const byte*, word32);
CYASSL_API void RipeMdFinal(RipeMd*, byte*);
#ifdef __cplusplus
} /* extern "C" */
#endif
#include <wolfssl/wolfcrypt/ripemd.h>
#endif /* CTAO_CRYPT_RIPEMD_H */
#endif /* CYASSL_RIPEMD */

View File

@ -81,6 +81,9 @@
#define CYASSL_X509_OBJECT WOLFSSL_X509_OBJECT
#define CYASSL_X509_STORE_CTX WOLFSSL_X509_STORE_CTX
/* cyassl/test.h */
#define CYASSL_THREAD WOLFSSL_THREAD
/* src/ssl.c */
#define CYASSL_CLIENT_END WOLFSSL_CLIENT_END
#define CYASSL_CERT_MANAGER WOLFSSL_CERT_MANAGER
@ -453,8 +456,8 @@
/* for ripemd reverse compatibility */
#define CYASSL_RIPEMD WOLFSSL_RIPEMD /* @TODO */
#ifdef WOLFSSL_RIPEMD
#define CYASSL_RIPEMD /* @TODO */
#define InitRipeMd wc_InitRipeMd
#define RipeMdUpdate wc_RipeMdUpdate
#define RipeMdFinal wc_RipeMdFinal

View File

@ -23,6 +23,7 @@
#include <config.h>
#endif
#include <cyassl/ssl.h> /* name change portability layer */
#if defined(CYASSL_MDK_ARM)
#include <stdio.h>
#include <string.h>

View File

@ -23,6 +23,7 @@
#include <config.h>
#endif
#include <cyassl/ssl.h> /* name change portability layer */
#include <cyassl/ctaocrypt/settings.h>
#ifdef HAVE_ECC
#include <cyassl/ctaocrypt/ecc.h> /* ecc_fp_free */

View File

@ -22,6 +22,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cyassl/ssl.h> /* name change portability layer */
#include <cyassl/ctaocrypt/settings.h>
#ifdef HAVE_ECC

View File

@ -31,6 +31,7 @@ endif
if BUILD_DES3
src_libcyassl_la_SOURCES += ctaocrypt/src/des3.c
src_libcyassl_la_SOURCES += wolfcrypt/src/des3.c
endif
if BUILD_SHA
@ -58,6 +59,7 @@ src_libcyassl_la_SOURCES += \
if BUILD_MEMORY
src_libcyassl_la_SOURCES += ctaocrypt/src/memory.c
src_libcyassl_la_SOURCES += wolfcrypt/src/memory.c
endif
if BUILD_DH
@ -82,10 +84,12 @@ endif
if BUILD_MD4
src_libcyassl_la_SOURCES += ctaocrypt/src/md4.c
src_libcyassl_la_SOURCES += wolfcrypt/src/md4.c
endif
if BUILD_MD5
src_libcyassl_la_SOURCES += ctaocrypt/src/md5.c
src_libcyassl_la_SOURCES += wolfcrypt/src/md5.c
endif
if BUILD_PWDBASED

View File

@ -32,7 +32,7 @@
#define FIPS_NO_WRAPPERS
#endif
#include <cyassl/ctaocrypt/des3.h>
#include <wolfssl/wolfcrypt/des3.h>
#include <cyassl/ctaocrypt/error-crypt.h>
#include <cyassl/ctaocrypt/logging.h>
@ -71,19 +71,6 @@ int wc_Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz)
}
void wc_DesCrypt(word32 *key, word32 *iv, byte* out, const byte* in, word32 sz,
int dir, int algo, int cryptoalgo)
{
DesCrypt(key, iv, out, in, sz, dir, algo, cryptoalgo);
}
int wc_Des_CbcEncrypt(Des* des, byte* out, const byte* in, word32 sz)
{
return Des_CbcEncrypt(des, out, in, sz);
}
int wc_Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz)
{
return Des_CbcDecrypt(des, out, in, sz);

View File

@ -34,7 +34,7 @@
#define wc_Md5Final Md5Final_sw
#endif
#include <cyassl/ctaocrypt/md5.h>
#include <wolfssl/wolfcrypt/md5.h>
#include <cyassl/ctaocrypt/error-crypt.h>
#ifdef NO_INLINE

View File

@ -7,6 +7,7 @@
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <cyassl/ssl.h> /* portability layer */
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/error-crypt.h>

View File

@ -21,49 +21,51 @@
#ifndef NO_MD5
#ifndef CTAO_CRYPT_MD5_H
#define CTAO_CRYPT_MD5_H
#ifndef WOLF_CRYPT_MD5_H
#define WOLF_CRYPT_MD5_H
#include <cyassl/ctaocrypt/types.h>
#include <cyassl/ctaocrypt/md5.h>
#ifdef __cplusplus
extern "C" {
#endif
/* in bytes */
enum {
#ifdef STM32F2_HASH
MD5_REG_SIZE = 4, /* STM32 register size, bytes */
#endif
MD5 = 0, /* hash type unique */
MD5_BLOCK_SIZE = 64,
MD5_DIGEST_SIZE = 16,
MD5_PAD_SIZE = 56
};
///* in bytes */
//enum {
//#ifdef STM32F2_HASH
// MD5_REG_SIZE = 4, /* STM32 register size, bytes */
//#endif
// MD5 = 0, /* hash type unique */
// MD5_BLOCK_SIZE = 64,
// MD5_DIGEST_SIZE = 16,
// MD5_PAD_SIZE = 56
//};
//
//#ifdef CYASSL_PIC32MZ_HASH
//#include "port/pic32/pic32mz-crypt.h"
//#endif
//
///* MD5 digest */
//typedef struct Md5 {
// word32 buffLen; /* in bytes */
// word32 loLen; /* length in bytes */
// word32 hiLen; /* length in bytes */
// word32 buffer[MD5_BLOCK_SIZE / sizeof(word32)];
// #ifndef CYASSL_PIC32MZ_HASH
// word32 digest[MD5_DIGEST_SIZE / sizeof(word32)];
// #else
// word32 digest[PIC32_HASH_SIZE / sizeof(word32)];
// pic32mz_desc desc ; /* Crypt Engine descripter */
// #endif
//} Md5;
#ifdef CYASSL_PIC32MZ_HASH
#include "port/pic32/pic32mz-crypt.h"
#endif
/* MD5 digest */
typedef struct Md5 {
word32 buffLen; /* in bytes */
word32 loLen; /* length in bytes */
word32 hiLen; /* length in bytes */
word32 buffer[MD5_BLOCK_SIZE / sizeof(word32)];
#ifndef CYASSL_PIC32MZ_HASH
word32 digest[MD5_DIGEST_SIZE / sizeof(word32)];
#else
word32 digest[PIC32_HASH_SIZE / sizeof(word32)];
pic32mz_desc desc ; /* Crypt Engine descripter */
#endif
} Md5;
CYASSL_API void InitMd5(Md5*);
CYASSL_API void Md5Update(Md5*, const byte*, word32);
CYASSL_API void Md5Final(Md5*, byte*);
CYASSL_API int Md5Hash(const byte*, word32, byte*);
WOLFSSL_API void wc_InitMd5(Md5*);
WOLFSSL_API void wc_Md5Update(Md5*, const byte*, word32);
WOLFSSL_API void wc_Md5Final(Md5*, byte*);
WOLFSSL_API int wc_Md5Hash(const byte*, word32, byte*);
#ifdef __cplusplus

View File

@ -24,8 +24,8 @@
// #if !defined(WOLF_CRYPT_TYPES_H) && !defined(CTAO_CRYPT_TYPES_H)
// #define WOLF_CRYPT_TYPES_H
// #include <wolfssl/wolfcrypt/settings.h>
// #include <wolfssl/wolfcrypt/wc_port.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/wc_port.h>
// #ifdef __cplusplus
// extern "C" {
@ -325,4 +325,4 @@
// #endif
// #endif /* WOLF_CRYPT_TYPES_H */
// #endif /* WOLF_CRYPT_TYPES_H */

View File

@ -20,7 +20,7 @@
*/
#if !defined(WOLF_CRYPT_PORT_H && CTAO_CRYPT_PORT_H)
#if !defined(WOLF_CRYPT_PORT_H) //&& CTAO_CRYPT_PORT_H)
#define WOLF_CRYPT_PORT_H