mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
configure.ac and tests/api.c: lock out compkey on FIPS 140-3 RC12 and ready, and add backward-compat code in test_wc_ecc_export_x963_ex() to allow RC12 compkey builds to pass unit.test.
This commit is contained in:
14
configure.ac
14
configure.ac
@ -2879,10 +2879,6 @@ if test "$ENABLED_WPAS" = "yes"
|
|||||||
then
|
then
|
||||||
ENABLED_COMPKEY=yes
|
ENABLED_COMPKEY=yes
|
||||||
fi
|
fi
|
||||||
if test "$ENABLED_COMPKEY" = "yes"
|
|
||||||
then
|
|
||||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_COMP_KEY"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# for using memory optimization setting on both curve25519 and ed25519
|
# for using memory optimization setting on both curve25519 and ed25519
|
||||||
@ -3947,6 +3943,9 @@ AS_CASE([$FIPS_VERSION],
|
|||||||
AS_IF([test "$ENABLED_KEYGEN" != "yes" && (test "$FIPS_VERSION" != "v5-dev" || test "$enable_keygen" != "no")],
|
AS_IF([test "$ENABLED_KEYGEN" != "yes" && (test "$FIPS_VERSION" != "v5-dev" || test "$enable_keygen" != "no")],
|
||||||
[ENABLED_KEYGEN="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"])
|
[ENABLED_KEYGEN="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KEY_GEN"])
|
||||||
|
|
||||||
|
AS_IF([test "$ENABLED_COMPKEY" = "yes" && (test "$FIPS_VERSION" != "v5-dev" || test "$enable_compkey" != "yes")],
|
||||||
|
[ENABLED_COMPKEY="no"])
|
||||||
|
|
||||||
AS_IF([test "$ENABLED_SHA224" != "yes" && (test "$FIPS_VERSION" != "v5-dev" || test "$enable_sha224" != "no")],
|
AS_IF([test "$ENABLED_SHA224" != "yes" && (test "$FIPS_VERSION" != "v5-dev" || test "$enable_sha224" != "no")],
|
||||||
[ENABLED_SHA224="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA224"])
|
[ENABLED_SHA224="yes"; AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SHA224"])
|
||||||
|
|
||||||
@ -7701,8 +7700,13 @@ if test "x$ENABLED_SECURE_RENEGOTIATION_INFO" = "xyes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test "$ENABLED_COMPKEY" = "yes"
|
||||||
|
then
|
||||||
|
AM_CFLAGS="$AM_CFLAGS -DHAVE_COMP_KEY"
|
||||||
|
fi
|
||||||
|
|
||||||
# Depricated Algorithm Handling
|
|
||||||
|
# Deprecated Algorithm Handling
|
||||||
if test "$ENABLED_ARC4" = "yes"
|
if test "$ENABLED_ARC4" = "yes"
|
||||||
then
|
then
|
||||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_RC4"
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALLOW_RC4"
|
||||||
|
@ -24715,7 +24715,12 @@ static int test_wc_ecc_export_x963_ex (void)
|
|||||||
if (ret == BAD_FUNC_ARG) {
|
if (ret == BAD_FUNC_ARG) {
|
||||||
ret = wc_ecc_export_x963_ex(&key, out, &badOutLen, COMP);
|
ret = wc_ecc_export_x963_ex(&key, out, &badOutLen, COMP);
|
||||||
}
|
}
|
||||||
if (ret == LENGTH_ONLY_E) {
|
#if defined(HAVE_FIPS) && (!defined(FIPS_VERSION_LT) || FIPS_VERSION_LT(5,3))
|
||||||
|
if (ret == BUFFER_E)
|
||||||
|
#else
|
||||||
|
if (ret == LENGTH_ONLY_E)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
key.idx = -4;
|
key.idx = -4;
|
||||||
ret = wc_ecc_export_x963_ex(&key, out, &outlen, COMP);
|
ret = wc_ecc_export_x963_ex(&key, out, &outlen, COMP);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user