forked from wolfSSL/wolfssl
close to build test with --disable-examples option
This commit is contained in:
@@ -472,7 +472,7 @@ AC_ARG_ENABLE([ripemd],
|
|||||||
|
|
||||||
if test "$ENABLED_RIPEMD" = "yes"
|
if test "$ENABLED_RIPEMD" = "yes"
|
||||||
then
|
then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD"
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_RIPEMD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"])
|
AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"])
|
||||||
|
@@ -25,40 +25,7 @@
|
|||||||
#ifndef CTAO_CRYPT_RIPEMD_H
|
#ifndef CTAO_CRYPT_RIPEMD_H
|
||||||
#define CTAO_CRYPT_RIPEME_H
|
#define CTAO_CRYPT_RIPEME_H
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/types.h>
|
#include <wolfssl/wolfcrypt/ripemd.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
|
|
||||||
|
|
||||||
#endif /* CTAO_CRYPT_RIPEMD_H */
|
#endif /* CTAO_CRYPT_RIPEMD_H */
|
||||||
#endif /* CYASSL_RIPEMD */
|
#endif /* CYASSL_RIPEMD */
|
||||||
|
@@ -81,6 +81,9 @@
|
|||||||
#define CYASSL_X509_OBJECT WOLFSSL_X509_OBJECT
|
#define CYASSL_X509_OBJECT WOLFSSL_X509_OBJECT
|
||||||
#define CYASSL_X509_STORE_CTX WOLFSSL_X509_STORE_CTX
|
#define CYASSL_X509_STORE_CTX WOLFSSL_X509_STORE_CTX
|
||||||
|
|
||||||
|
/* cyassl/test.h */
|
||||||
|
#define CYASSL_THREAD WOLFSSL_THREAD
|
||||||
|
|
||||||
/* src/ssl.c */
|
/* src/ssl.c */
|
||||||
#define CYASSL_CLIENT_END WOLFSSL_CLIENT_END
|
#define CYASSL_CLIENT_END WOLFSSL_CLIENT_END
|
||||||
#define CYASSL_CERT_MANAGER WOLFSSL_CERT_MANAGER
|
#define CYASSL_CERT_MANAGER WOLFSSL_CERT_MANAGER
|
||||||
@@ -453,8 +456,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/* for ripemd reverse compatibility */
|
/* for ripemd reverse compatibility */
|
||||||
#define CYASSL_RIPEMD WOLFSSL_RIPEMD /* @TODO */
|
|
||||||
#ifdef WOLFSSL_RIPEMD
|
#ifdef WOLFSSL_RIPEMD
|
||||||
|
#define CYASSL_RIPEMD /* @TODO */
|
||||||
#define InitRipeMd wc_InitRipeMd
|
#define InitRipeMd wc_InitRipeMd
|
||||||
#define RipeMdUpdate wc_RipeMdUpdate
|
#define RipeMdUpdate wc_RipeMdUpdate
|
||||||
#define RipeMdFinal wc_RipeMdFinal
|
#define RipeMdFinal wc_RipeMdFinal
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cyassl/ssl.h> /* name change portability layer */
|
||||||
#if defined(CYASSL_MDK_ARM)
|
#if defined(CYASSL_MDK_ARM)
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cyassl/ssl.h> /* name change portability layer */
|
||||||
#include <cyassl/ctaocrypt/settings.h>
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
#include <cyassl/ctaocrypt/ecc.h> /* ecc_fp_free */
|
#include <cyassl/ctaocrypt/ecc.h> /* ecc_fp_free */
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <cyassl/ssl.h> /* name change portability layer */
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/settings.h>
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
|
@@ -31,6 +31,7 @@ endif
|
|||||||
|
|
||||||
if BUILD_DES3
|
if BUILD_DES3
|
||||||
src_libcyassl_la_SOURCES += ctaocrypt/src/des3.c
|
src_libcyassl_la_SOURCES += ctaocrypt/src/des3.c
|
||||||
|
src_libcyassl_la_SOURCES += wolfcrypt/src/des3.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_SHA
|
if BUILD_SHA
|
||||||
@@ -58,6 +59,7 @@ src_libcyassl_la_SOURCES += \
|
|||||||
|
|
||||||
if BUILD_MEMORY
|
if BUILD_MEMORY
|
||||||
src_libcyassl_la_SOURCES += ctaocrypt/src/memory.c
|
src_libcyassl_la_SOURCES += ctaocrypt/src/memory.c
|
||||||
|
src_libcyassl_la_SOURCES += wolfcrypt/src/memory.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_DH
|
if BUILD_DH
|
||||||
@@ -82,10 +84,12 @@ endif
|
|||||||
|
|
||||||
if BUILD_MD4
|
if BUILD_MD4
|
||||||
src_libcyassl_la_SOURCES += ctaocrypt/src/md4.c
|
src_libcyassl_la_SOURCES += ctaocrypt/src/md4.c
|
||||||
|
src_libcyassl_la_SOURCES += wolfcrypt/src/md4.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_MD5
|
if BUILD_MD5
|
||||||
src_libcyassl_la_SOURCES += ctaocrypt/src/md5.c
|
src_libcyassl_la_SOURCES += ctaocrypt/src/md5.c
|
||||||
|
src_libcyassl_la_SOURCES += wolfcrypt/src/md5.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_PWDBASED
|
if BUILD_PWDBASED
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#define FIPS_NO_WRAPPERS
|
#define FIPS_NO_WRAPPERS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/des3.h>
|
#include <wolfssl/wolfcrypt/des3.h>
|
||||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
#include <cyassl/ctaocrypt/logging.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)
|
int wc_Des_CbcDecrypt(Des* des, byte* out, const byte* in, word32 sz)
|
||||||
{
|
{
|
||||||
return Des_CbcDecrypt(des, out, in, sz);
|
return Des_CbcDecrypt(des, out, in, sz);
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
#define wc_Md5Final Md5Final_sw
|
#define wc_Md5Final Md5Final_sw
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/md5.h>
|
#include <wolfssl/wolfcrypt/md5.h>
|
||||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||||
|
|
||||||
#ifdef NO_INLINE
|
#ifdef NO_INLINE
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <cyassl/ssl.h> /* portability layer */
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||||
|
@@ -21,49 +21,51 @@
|
|||||||
|
|
||||||
#ifndef NO_MD5
|
#ifndef NO_MD5
|
||||||
|
|
||||||
#ifndef CTAO_CRYPT_MD5_H
|
#ifndef WOLF_CRYPT_MD5_H
|
||||||
#define CTAO_CRYPT_MD5_H
|
#define WOLF_CRYPT_MD5_H
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/types.h>
|
#include <cyassl/ctaocrypt/types.h>
|
||||||
|
|
||||||
|
#include <cyassl/ctaocrypt/md5.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* in bytes */
|
///* in bytes */
|
||||||
enum {
|
//enum {
|
||||||
#ifdef STM32F2_HASH
|
//#ifdef STM32F2_HASH
|
||||||
MD5_REG_SIZE = 4, /* STM32 register size, bytes */
|
// MD5_REG_SIZE = 4, /* STM32 register size, bytes */
|
||||||
#endif
|
//#endif
|
||||||
MD5 = 0, /* hash type unique */
|
// MD5 = 0, /* hash type unique */
|
||||||
MD5_BLOCK_SIZE = 64,
|
// MD5_BLOCK_SIZE = 64,
|
||||||
MD5_DIGEST_SIZE = 16,
|
// MD5_DIGEST_SIZE = 16,
|
||||||
MD5_PAD_SIZE = 56
|
// 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
|
WOLFSSL_API void wc_InitMd5(Md5*);
|
||||||
#include "port/pic32/pic32mz-crypt.h"
|
WOLFSSL_API void wc_Md5Update(Md5*, const byte*, word32);
|
||||||
#endif
|
WOLFSSL_API void wc_Md5Final(Md5*, byte*);
|
||||||
|
WOLFSSL_API int wc_Md5Hash(const byte*, word32, byte*);
|
||||||
/* 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*);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -24,8 +24,8 @@
|
|||||||
// #if !defined(WOLF_CRYPT_TYPES_H) && !defined(CTAO_CRYPT_TYPES_H)
|
// #if !defined(WOLF_CRYPT_TYPES_H) && !defined(CTAO_CRYPT_TYPES_H)
|
||||||
// #define WOLF_CRYPT_TYPES_H
|
// #define WOLF_CRYPT_TYPES_H
|
||||||
|
|
||||||
// #include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
// #include <wolfssl/wolfcrypt/wc_port.h>
|
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||||
|
|
||||||
// #ifdef __cplusplus
|
// #ifdef __cplusplus
|
||||||
// extern "C" {
|
// extern "C" {
|
||||||
|
@@ -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
|
#define WOLF_CRYPT_PORT_H
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user