1. Refactored src/include.am to use the new changes in configure for
multiple FIPS versions.
2. Added conditions for wolfRand.
This commit is contained in:
John Safranek
2019-06-19 16:51:51 -07:00
parent 52b5843cbb
commit 031cd27c1d

View File

@ -24,7 +24,8 @@ include_HEADERS+=$(IPPHEADERS)
endif # BUILD_FAST_RSA
if BUILD_FIPS
if !BUILD_FIPS_V2
if BUILD_FIPS_V1
# fips first file
src_libwolfssl_la_SOURCES += ctaocrypt/src/wolfcrypt_first.c
@ -58,9 +59,9 @@ src_libwolfssl_la_SOURCES += ctaocrypt/src/fips_test.c
# fips last file
src_libwolfssl_la_SOURCES += ctaocrypt/src/wolfcrypt_last.c
endif
else
if BUILD_FIPS_V2
# FIPSv2 first file
src_libwolfssl_la_SOURCES += \
wolfcrypt/src/wolfcrypt_first.c
@ -116,14 +117,29 @@ src_libwolfssl_la_SOURCES += wolfcrypt/src/fips.c \
# fips last file
src_libwolfssl_la_SOURCES += wolfcrypt/src/wolfcrypt_last.c
endif
if BUILD_FIPS_RAND
src_libwolfssl_la_SOURCES += \
wolfcrypt/src/wolfcrypt_first.c \
wolfcrypt/src/hmac.c \
wolfcrypt/src/random.c \
wolfcrypt/src/sha256.c \
wolfcrypt/src/fips.c \
wolfcrypt/src/fips_test.c \
wolfcrypt/src/wolfcrypt_last.c
endif
endif
# For FIPSV2, exclude the wolfCrypt files included above.
# For wolfRand, exclude just a couple files.
# For old FIPS, keep the wolfCrypt versions of the
# CtaoCrypt files included above.
if !BUILD_FIPS_V2
if !BUILD_FIPS_RAND
src_libwolfssl_la_SOURCES += wolfcrypt/src/hmac.c
endif
endif
# CAVP self test
if BUILD_SELFTEST
@ -135,12 +151,15 @@ src_libwolfssl_la_SOURCES += \
wolfcrypt/src/cpuid.c
if !BUILD_FIPS_V2
if !BUILD_FIPS_RAND
if BUILD_RNG
src_libwolfssl_la_SOURCES += wolfcrypt/src/random.c
endif
endif
endif
if !BUILD_FIPS_V2
if !BUILD_FIPS_RAND
if BUILD_ARMASM
src_libwolfssl_la_SOURCES += wolfcrypt/src/port/arm/armv8-sha256.c
else
@ -150,6 +169,7 @@ src_libwolfssl_la_SOURCES += wolfcrypt/src/sha256_asm.S
endif
endif
endif
endif
if BUILD_AFALG
src_libwolfssl_la_SOURCES += wolfcrypt/src/port/af_alg/afalg_hash.c