Skip to content

Commit 950ee40

Browse files
committed
additional fixes and enhancements for -DOPENSSL_EXTRA -DOPENSSL_COEXIST:
configure.ac: * add --enable-all-osp to separate OSP meta-feature sets from --enable-all, allowing --enable-all --disable-all-osp --disable-opensslall (e.g. for testing OPENSSL_COEXIST). * fix enable_all_crypto=yes in enable-all to be conditional on "$enable_all_crypto" = "". * move enable_rsapss=yes from enable-all to enable-all-crypto. examples/ and testsuite/: #undef OPENSSL_COEXIST unconditionally rather than only if defined(OPENSSL_EXTRA), to capture -DOPENSSL_EXTRA_X509_SMALL or any other such variants.
1 parent 39e8cb5 commit 950ee40

7 files changed

Lines changed: 68 additions & 50 deletions

File tree

configure.ac

Lines changed: 62 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -893,36 +893,35 @@ then
893893
fi
894894

895895

896-
897-
# ALL FEATURES
896+
# All features, except conflicting or experimental:
898897
AC_ARG_ENABLE([all],
899898
[AS_HELP_STRING([--enable-all],[Enable all wolfSSL features, except SSLv3 (default: disabled)])],
900899
[ ENABLED_ALL=$enableval ],
901900
[ ENABLED_ALL=no ]
902901
)
903902
if test "$ENABLED_ALL" = "yes"
904903
then
905-
enable_all_crypto=yes
904+
test "$enable_all_crypto" = "" && enable_all_crypto=yes
905+
906+
test "$enable_all_osp" = "" && test "$ENABLED_LINUXKM_DEFAULTS" != "yes" && enable_all_osp=yes
906907

907908
test "$enable_dtls" = "" && enable_dtls=yes
908909
if test "x$FIPS_VERSION" != "xv1"
909910
then
910911
test "$enable_tls13" = "" && enable_tls13=yes
911-
test "$enable_rsapss" = "" && enable_rsapss=yes
912912
fi
913913

914914
test "$enable_savesession" = "" && enable_savesession=yes
915915
test "$enable_savecert" = "" && enable_savecert=yes
916916
test "$enable_postauth" = "" && enable_postauth=yes
917917
test "$enable_hrrcookie" = "" && enable_hrrcookie=yes
918918
test "$enable_fallback_scsv" = "" && enable_fallback_scsv=yes
919-
test "$enable_webserver" = "" && enable_webserver=yes
920919
test "$enable_crl_monitor" = "" && enable_crl_monitor=yes
921920
test "$enable_sni" = "" && enable_sni=yes
922921
test "$enable_maxfragment" = "" && enable_maxfragment=yes
923922
test "$enable_alpn" = "" && enable_alpn=yes
924923
test "$enable_truncatedhmac" = "" && enable_truncatedhmac=yes
925-
test "$enable_trusted_ca" = "" && enable_trusted_ca=yes
924+
test "$enable_trustedca" = "" && enable_trustedca=yes
926925
test "$enable_session_ticket" = "" && enable_session_ticket=yes
927926
test "$enable_earlydata" = "" && enable_earlydata=yes
928927
test "$enable_ech" = "" && enable_ech=yes
@@ -939,41 +938,16 @@ then
939938
# linuxkm is incompatible with opensslextra and its dependents.
940939
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
941940
then
942-
if test "$ENABLED_FIPS" = "no"
943-
then
944-
if test "$ENABLED_32BIT" != "yes"
945-
then
946-
test "$enable_openssh" = "" && enable_openssh=yes
947-
fi
948-
# S/MIME support requires PKCS7, which requires no FIPS.
949-
test "$enable_smime" = "" && enable_smime=yes
950-
fi
951941
test "$enable_opensslextra" = "" && enable_opensslextra=yes
952942
test "$enable_opensslall" = "" && enable_opensslall=yes
953943
test "$enable_certservice" = "" && enable_certservice=yes
954-
test "$enable_lighty" = "" && enable_lighty=yes
955-
test "$enable_nginx" = "" && enable_nginx=yes
956-
test "$enable_openvpn" = "" && enable_openvpn=yes
957-
test "$enable_asio" = "" && enable_asio=yes
958-
test "$enable_libwebsockets" = "" && enable_libwebsockets=yes
959-
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then
960-
test "$enable_qt" = "" && enable_qt=yes
961-
fi
962944
fi
963945
fi
964946

965947
if test "$ENABLED_FIPS" = "no"
966948
then
967949
test "$enable_scep" = "" && enable_scep=yes
968950
test "$enable_mcast" = "" && enable_mcast=yes
969-
970-
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
971-
then
972-
# these use DES3:
973-
test "$enable_stunnel" = "" && enable_stunnel=yes
974-
test "$enable_curl" = "" && enable_curl=yes
975-
test "$enable_tcpdump" = "" && enable_tcpdump=yes
976-
fi
977951
fi
978952

979953
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6
@@ -994,6 +968,57 @@ then
994968
fi
995969

996970

971+
# All OSP meta-features:
972+
AC_ARG_ENABLE([all-osp],
973+
[AS_HELP_STRING([--enable-all-osp],[Enable all OSP meta feature sets (default: disabled)])],
974+
[ ENABLED_ALL_OSP=$enableval ],
975+
[ ENABLED_ALL_OSP=no]
976+
)
977+
978+
if test "$ENABLED_ALL_OSP" = "yes"
979+
then
980+
if test "$ENABLED_LINUXKM_DEFAULTS" = "yes"
981+
then
982+
AC_MSG_ERROR([--enable-all-osp is incompatible with --enable-linuxkm-defaults])
983+
fi
984+
985+
test "$enable_webserver" = "" && enable_webserver=yes
986+
987+
if test "$ENABLED_SP_MATH" = "no"
988+
then
989+
if test "$ENABLED_FIPS" = "no"
990+
then
991+
# S/MIME support requires PKCS7, which requires no FIPS.
992+
test "$enable_smime" = "" && enable_smime=yes
993+
if test "$ENABLED_32BIT" != "yes"
994+
then
995+
test "$enable_openssh" = "" && enable_openssh=yes
996+
fi
997+
fi
998+
999+
if test "$ENABLED_ALL_OSP" != "no"
1000+
then
1001+
test "$enable_lighty" = "" && enable_lighty=yes
1002+
test "$enable_nginx" = "" && enable_nginx=yes
1003+
test "$enable_openvpn" = "" && enable_openvpn=yes
1004+
test "$enable_asio" = "" && enable_asio=yes
1005+
test "$enable_libwebsockets" = "" && enable_libwebsockets=yes
1006+
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then
1007+
test "$enable_qt" = "" && enable_qt=yes
1008+
fi
1009+
fi
1010+
fi
1011+
1012+
if test "$ENABLED_FIPS" = "no"
1013+
then
1014+
# these use DES3:
1015+
test "$enable_stunnel" = "" && enable_stunnel=yes
1016+
test "$enable_curl" = "" && enable_curl=yes
1017+
test "$enable_tcpdump" = "" && enable_tcpdump=yes
1018+
fi
1019+
fi
1020+
1021+
9971022
# Auto-selected activation of all applicable asm accelerations
9981023

9991024
# Enable asm automatically only if the compiler advertises itself as full Gnu C.
@@ -1090,7 +1115,7 @@ then
10901115
fi
10911116

10921117

1093-
# ALL CRYPTO FEATURES
1118+
# All wolfCrypt features:
10941119
AC_ARG_ENABLE([all-crypto],
10951120
[AS_HELP_STRING([--enable-all-crypto],[Enable all wolfcrypt algorithms (default: disabled)])],
10961121
[ ENABLED_ALL_CRYPT=$enableval ],
@@ -1149,6 +1174,11 @@ then
11491174
test "$enable_anon" = "" && enable_anon=yes
11501175
test "$enable_ssh" = "" && test "$enable_hmac" != "no" && enable_ssh=yes
11511176

1177+
if test "x$FIPS_VERSION" != "xv1"
1178+
then
1179+
test "$enable_rsapss" = "" && enable_rsapss=yes
1180+
fi
1181+
11521182
# sp-math is incompatible with opensslextra, ECC custom curves, and DSA.
11531183
if test "$ENABLED_SP_MATH" = "no"
11541184
then

examples/benchmark/tls_bench.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ Or
4141
#include <wolfssl/wolfcrypt/settings.h>
4242

4343
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
44-
#ifdef OPENSSL_EXTRA
45-
#undef OPENSSL_COEXIST /* can't use this option with this example */
46-
#endif
44+
#undef OPENSSL_COEXIST /* can't use this option with this example */
4745

4846
#include <wolfssl/wolfcrypt/types.h>
4947
#include <wolfssl/wolfcrypt/wc_port.h>

examples/client/client.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
#include <wolfssl/wolfcrypt/settings.h>
3434

3535
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
36-
#ifdef OPENSSL_EXTRA
37-
#undef OPENSSL_COEXIST /* can't use this option with this example */
38-
#endif
36+
#undef OPENSSL_COEXIST /* can't use this option with this example */
3937

4038
#include <wolfssl/ssl.h>
4139

examples/echoserver/echoserver.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
#include <wolfssl/wolfcrypt/settings.h>
3131

3232
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
33-
#ifdef OPENSSL_EXTRA
34-
#undef OPENSSL_COEXIST /* can't use this option with this example */
35-
#endif
33+
#undef OPENSSL_COEXIST /* can't use this option with this example */
3634

3735
#include <wolfssl/ssl.h> /* name change portability layer */
3836
#include <wolfssl/wolfcrypt/settings.h>

examples/server/server.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
#include <wolfssl/wolfcrypt/settings.h>
3434

3535
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
36-
#ifdef OPENSSL_EXTRA
37-
#undef OPENSSL_COEXIST /* can't use this option with this example */
38-
#endif
36+
#undef OPENSSL_COEXIST /* can't use this option with this example */
3937

4038
#include <wolfssl/ssl.h> /* name change portability layer */
4139

tests/unit.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
#endif
3535

3636
#undef TEST_OPENSSL_COEXIST /* can't use this option with unit tests */
37-
#ifdef OPENSSL_EXTRA
38-
#undef OPENSSL_COEXIST /* can't use this option with unit tests */
39-
#endif
37+
#undef OPENSSL_COEXIST /* can't use this option with unit tests */
4038

4139
#include <wolfssl/ssl.h>
4240
#include <wolfssl/test.h> /* thread and tcp stuff */

testsuite/testsuite.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
#endif
3131

3232
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
33-
#ifdef OPENSSL_EXTRA
34-
#undef OPENSSL_COEXIST /* can't use this option with this example */
35-
#endif
33+
#undef OPENSSL_COEXIST /* can't use this option with this example */
3634

3735
#include <wolfssl/wolfcrypt/types.h>
3836

0 commit comments

Comments
 (0)