mirror of https://github.com/wolfSSL/wolfssl.git
Resolve armasm fips wrappers and sanity
parent
0d83d0d199
commit
71e83cdd19
|
@ -35,13 +35,28 @@
|
|||
|
||||
#if !defined(NO_AES) && defined(WOLFSSL_ARMASM)
|
||||
|
||||
#if defined(HAVE_FIPS) && !defined(FIPS_NO_WRAPPERS)
|
||||
#define FIPS_NO_WRAPPERS
|
||||
#if FIPS_VERSION3_LT(6,0,0) && defined(HAVE_FIPS)
|
||||
#undef HAVE_FIPS
|
||||
#else
|
||||
#if defined(HAVE_FIPS) && FIPS_VERSION3_GE(6,0,0)
|
||||
/* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */
|
||||
#define FIPS_NO_WRAPPERS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WOLFSSL_ARMASM_NO_HW_CRYPTO
|
||||
|
||||
#include <wolfssl/wolfcrypt/aes.h>
|
||||
|
||||
#if FIPS_VERSION3_GE(6,0,0)
|
||||
const unsigned int wolfCrypt_FIPS_aes_ro_sanity[2] =
|
||||
{ 0x1a2b3c4d, 0x00000002 };
|
||||
int wolfCrypt_FIPS_AES_sanity(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#ifdef NO_INLINE
|
||||
#include <wolfssl/wolfcrypt/misc.h>
|
||||
|
|
|
@ -29,11 +29,24 @@
|
|||
#ifdef WOLFSSL_ARMASM
|
||||
#if !defined(NO_SHA256) || defined(WOLFSSL_SHA224)
|
||||
|
||||
#ifdef HAVE_FIPS
|
||||
#undef HAVE_FIPS
|
||||
#if FIPS_VERSION3_LT(6,0,0) && defined(HAVE_FIPS)
|
||||
#undef HAVE_FIPS
|
||||
#else
|
||||
#if defined(HAVE_FIPS) && FIPS_VERSION3_GE(6,0,0)
|
||||
/* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */
|
||||
#define FIPS_NO_WRAPPERS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/sha256.h>
|
||||
#if FIPS_VERSION3_GE(6,0,0)
|
||||
const unsigned int wolfCrypt_FIPS_sha256_ro_sanity[2] =
|
||||
{ 0x1a2b3c4d, 0x00000014 };
|
||||
int wolfCrypt_FIPS_SHA256_sanity(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
|
||||
|
|
|
@ -28,11 +28,25 @@
|
|||
#ifdef WOLFSSL_ARMASM
|
||||
#if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
|
||||
|
||||
#ifdef HAVE_FIPS
|
||||
#undef HAVE_FIPS
|
||||
#if FIPS_VERSION3_LT(6,0,0) && defined(HAVE_FIPS)
|
||||
#undef HAVE_FIPS
|
||||
#else
|
||||
#if defined(HAVE_FIPS) && FIPS_VERSION3_GE(6,0,0)
|
||||
/* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */
|
||||
#define FIPS_NO_WRAPPERS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include <wolfssl/wolfcrypt/sha512.h>
|
||||
#if FIPS_VERSION3_GE(6,0,0)
|
||||
const unsigned int wolfCrypt_FIPS_sha512_ro_sanity[2] =
|
||||
{ 0x1a2b3c4d, 0x00000015 };
|
||||
int wolfCrypt_FIPS_SHA512_sanity(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/hash.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue