Skip to content

Commit 836b741

Browse files
authored
Merge pull request wolfSSL#8132 from douzzer/20241024-opensslcoexist-opensslextra
20241024-opensslcoexist-opensslextra
2 parents ca6d49d + 950ee40 commit 836b741

73 files changed

Lines changed: 4530 additions & 3625 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmake/options.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extern "C" {
6565
#undef GCM_WORD32
6666
#cmakedefine GCM_WORD32
6767
#undef HAVE___UINT128_T
68-
#cmakedefine HAVE___UINT128_T
68+
#cmakedefine HAVE___UINT128_T 1
6969
#undef HAVE_AES_KEYWRAP
7070
#cmakedefine HAVE_AES_KEYWRAP
7171
#undef HAVE_AESCCM

configure.ac

Lines changed: 63 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -896,36 +896,35 @@ then
896896
fi
897897

898898

899-
900-
# ALL FEATURES
899+
# All features, except conflicting or experimental:
901900
AC_ARG_ENABLE([all],
902901
[AS_HELP_STRING([--enable-all],[Enable all wolfSSL features, except SSLv3 (default: disabled)])],
903902
[ ENABLED_ALL=$enableval ],
904903
[ ENABLED_ALL=no ]
905904
)
906905
if test "$ENABLED_ALL" = "yes"
907906
then
908-
enable_all_crypto=yes
907+
test "$enable_all_crypto" = "" && enable_all_crypto=yes
908+
909+
test "$enable_all_osp" = "" && test "$ENABLED_LINUXKM_DEFAULTS" != "yes" && enable_all_osp=yes
909910

910911
test "$enable_dtls" = "" && enable_dtls=yes
911912
if test "x$FIPS_VERSION" != "xv1"
912913
then
913914
test "$enable_tls13" = "" && enable_tls13=yes
914-
test "$enable_rsapss" = "" && enable_rsapss=yes
915915
fi
916916

917917
test "$enable_savesession" = "" && enable_savesession=yes
918918
test "$enable_savecert" = "" && enable_savecert=yes
919919
test "$enable_postauth" = "" && enable_postauth=yes
920920
test "$enable_hrrcookie" = "" && enable_hrrcookie=yes
921921
test "$enable_fallback_scsv" = "" && enable_fallback_scsv=yes
922-
test "$enable_webserver" = "" && enable_webserver=yes
923922
test "$enable_crl_monitor" = "" && enable_crl_monitor=yes
924923
test "$enable_sni" = "" && enable_sni=yes
925924
test "$enable_maxfragment" = "" && enable_maxfragment=yes
926925
test "$enable_alpn" = "" && enable_alpn=yes
927926
test "$enable_truncatedhmac" = "" && enable_truncatedhmac=yes
928-
test "$enable_trusted_ca" = "" && enable_trusted_ca=yes
927+
test "$enable_trustedca" = "" && enable_trustedca=yes
929928
test "$enable_session_ticket" = "" && enable_session_ticket=yes
930929
test "$enable_earlydata" = "" && enable_earlydata=yes
931930
test "$enable_ech" = "" && enable_ech=yes
@@ -942,41 +941,16 @@ then
942941
# linuxkm is incompatible with opensslextra and its dependents.
943942
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
944943
then
945-
if test "$ENABLED_FIPS" = "no"
946-
then
947-
if test "$ENABLED_32BIT" != "yes"
948-
then
949-
test "$enable_openssh" = "" && enable_openssh=yes
950-
fi
951-
# S/MIME support requires PKCS7, which requires no FIPS.
952-
test "$enable_smime" = "" && enable_smime=yes
953-
fi
954944
test "$enable_opensslextra" = "" && enable_opensslextra=yes
955945
test "$enable_opensslall" = "" && enable_opensslall=yes
956946
test "$enable_certservice" = "" && enable_certservice=yes
957-
test "$enable_lighty" = "" && enable_lighty=yes
958-
test "$enable_nginx" = "" && enable_nginx=yes
959-
test "$enable_openvpn" = "" && enable_openvpn=yes
960-
test "$enable_asio" = "" && enable_asio=yes
961-
test "$enable_libwebsockets" = "" && enable_libwebsockets=yes
962-
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then
963-
test "$enable_qt" = "" && enable_qt=yes
964-
fi
965947
fi
966948
fi
967949

968950
if test "$ENABLED_FIPS" = "no"
969951
then
970952
test "$enable_scep" = "" && enable_scep=yes
971953
test "$enable_mcast" = "" && enable_mcast=yes
972-
973-
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
974-
then
975-
# these use DES3:
976-
test "$enable_stunnel" = "" && enable_stunnel=yes
977-
test "$enable_curl" = "" && enable_curl=yes
978-
test "$enable_tcpdump" = "" && enable_tcpdump=yes
979-
fi
980954
fi
981955

982956
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -ge 6
@@ -997,6 +971,57 @@ then
997971
fi
998972

999973

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

10021027
# Enable asm automatically only if the compiler advertises itself as full Gnu C.
@@ -1093,7 +1118,7 @@ then
10931118
fi
10941119

10951120

1096-
# ALL CRYPTO FEATURES
1121+
# All wolfCrypt features:
10971122
AC_ARG_ENABLE([all-crypto],
10981123
[AS_HELP_STRING([--enable-all-crypto],[Enable all wolfcrypt algorithms (default: disabled)])],
10991124
[ ENABLED_ALL_CRYPT=$enableval ],
@@ -1152,6 +1177,11 @@ then
11521177
test "$enable_anon" = "" && enable_anon=yes
11531178
test "$enable_ssh" = "" && test "$enable_hmac" != "no" && enable_ssh=yes
11541179

1180+
if test "x$FIPS_VERSION" != "xv1"
1181+
then
1182+
test "$enable_rsapss" = "" && enable_rsapss=yes
1183+
fi
1184+
11551185
# sp-math is incompatible with opensslextra, ECC custom curves, and DSA.
11561186
if test "$ENABLED_SP_MATH" = "no"
11571187
then
@@ -9354,7 +9384,7 @@ then
93549384
AM_CFLAGS="$AM_CFLAGS -DNO_HMAC"
93559385
fi
93569386
9357-
if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "x$ENABLED_OPENSSLCOEXIST" = "xno"
9387+
if test "$ENABLED_OPENSSLEXTRA" = "yes"
93589388
then
93599389
AM_CFLAGS="$AM_CFLAGS -DOPENSSL_EXTRA"
93609390
fi
@@ -9575,9 +9605,6 @@ if test "x$ENABLED_OPENSSLCOEXIST" = "xyes"; then
95759605
if test "x$ENABLED_OPENSSLALL" = "xyes"; then
95769606
AC_MSG_ERROR([Cannot use --enable-opensslcoexist with --enable-opensslall])
95779607
fi
9578-
if test "x$ENABLED_OPENSSLEXTRA" = "xyes"; then
9579-
AC_MSG_ERROR([Cannot use --enable-opensslcoexist with --enable-opensslextra])
9580-
fi
95819608
fi
95829609
95839610
if test "$ENABLED_WOLFSSH" = "yes" && test "$ENABLED_HMAC" = "no"

examples/benchmark/tls_bench.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ Or
3232
bench_tls(args);
3333
*/
3434

35-
3635
#ifdef HAVE_CONFIG_H
3736
#include <config.h>
3837
#endif
3938
#ifndef WOLFSSL_USER_SETTINGS
4039
#include <wolfssl/options.h>
4140
#endif
4241
#include <wolfssl/wolfcrypt/settings.h>
42+
43+
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
44+
#undef OPENSSL_COEXIST /* can't use this option with this example */
45+
4346
#include <wolfssl/wolfcrypt/types.h>
4447
#include <wolfssl/wolfcrypt/wc_port.h>
4548
#include <wolfssl/ssl.h>

examples/client/client.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#endif
3333
#include <wolfssl/wolfcrypt/settings.h>
3434

35+
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
36+
#undef OPENSSL_COEXIST /* can't use this option with this example */
37+
3538
#include <wolfssl/ssl.h>
3639

3740
#ifdef WOLFSSL_WOLFSENTRY_HOOKS

examples/echoclient/echoclient.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,19 @@
2525
#endif
2626

2727
#include <wolfssl/wolfcrypt/settings.h>
28-
/* let's use cyassl layer AND cyassl openssl layer */
29-
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
30-
#include <wolfssl/ssl.h>
28+
#ifndef WOLFSSL_USER_SETTINGS
29+
#include <wolfssl/options.h>
30+
#endif
3131

3232
/* Force enable the compatibility macros for this example */
33+
#undef TEST_OPENSSL_COEXIST
34+
#undef OPENSSL_COEXIST
35+
#ifndef OPENSSL_EXTRA_X509_SMALL
36+
#define OPENSSL_EXTRA_X509_SMALL
37+
#endif
38+
39+
#include <wolfssl/ssl.h>
40+
3341
#ifdef WOLFSSL_DTLS
3442
#include <wolfssl/error-ssl.h>
3543
#endif
@@ -45,9 +53,6 @@
4553

4654
#include <wolfssl/test.h>
4755

48-
#ifndef OPENSSL_EXTRA_X509_SMALL
49-
#define OPENSSL_EXTRA_X509_SMALL
50-
#endif
5156
#include <wolfssl/openssl/ssl.h>
5257

5358
#include <examples/echoclient/echoclient.h>

examples/echoserver/echoserver.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
#include <config.h>
2525
#endif
2626

27+
#ifndef WOLFSSL_USER_SETTINGS
28+
#include <wolfssl/options.h>
29+
#endif
30+
#include <wolfssl/wolfcrypt/settings.h>
31+
32+
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
33+
#undef OPENSSL_COEXIST /* can't use this option with this example */
34+
2735
#include <wolfssl/ssl.h> /* name change portability layer */
2836
#include <wolfssl/wolfcrypt/settings.h>
2937
#ifdef HAVE_ECC

examples/server/server.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#include <wolfssl/wolfcrypt/settings.h>
3434

3535
#undef TEST_OPENSSL_COEXIST /* can't use this option with this example */
36+
#undef OPENSSL_COEXIST /* can't use this option with this example */
37+
3638
#include <wolfssl/ssl.h> /* name change portability layer */
3739

3840
#ifdef HAVE_ECC

0 commit comments

Comments
 (0)