@@ -377,6 +377,83 @@ if(NOT WOLFSSL_RNG)
377377 list (APPEND WOLFSSL_DEFINITIONS "-DWC_NO_RNG" )
378378endif ()
379379
380+ # QUIC
381+ add_option (WOLFSSL_QUIC
382+ "Enable QUIC support (default: disabled)"
383+ "no" "yes;no" )
384+
385+ if (WOLFSSL_QUIC)
386+ set (WOLFSSL_ALPN "yes" )
387+ set (WOLFSSL_OPENSSLEXTRA "yes" )
388+ set (WOLFSSL_AESCTR "yes" )
389+ set (WOLFSSL_CURVE25519 "yes" )
390+ set (WOLFSSL_SNI "yes" )
391+ list (APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_QUIC" "-DHAVE_EX_DATA" )
392+ endif ()
393+
394+ # Curl
395+ add_option (WOLFSSL_CURL
396+ "Enable CURL support (default: disabled)"
397+ "no" "yes;no" )
398+
399+ if (WOLFSSL_CURL)
400+ set (WOLFSSL_MD4 "yes" )
401+ set (WOLFSSL_DES3 "yes" )
402+ set (WOLFSSL_ALPN "yes" )
403+ set (WOLFSSL_OPENSSLEXTRA "yes" )
404+ set (WOLFSSL_CRL "yes" )
405+ set (WOLFSSL_OCSP "yes" )
406+ set (WOLFSSL_OCSPSTAPLING "yes" )
407+ set (WOLFSSL_OCSPSTAPLING_V2 "yes" )
408+ set (WOLFSSL_SNI "yes" )
409+ set (WOLFSSL_ALT_CERT_CHAINS "yes" )
410+ set (WOLFSSL_IP_ALT_NAME "yes" )
411+ set (WOLFSSL_SESSION_TICKET "yes" )
412+ set (WOLFSSL_WOLFSSH "yes" )
413+ list (APPEND WOLFSSL_DEFINITIONS
414+ "-DNO_SESSION_CACHE_REF" "-DWOLFSSL_DES_ECB" )
415+ endif ()
416+
417+ # ALPN
418+ add_option (WOLFSSL_ALPN
419+ "Enable ALPN support (default: disabled)"
420+ "no" "yes;no" )
421+
422+ if (WOLFSSL_ALPN)
423+ list (APPEND WOLFSSL_DEFINITIONS "-DHAVE_ALPN" "-DHAVE_TLS_EXTENSIONS" )
424+ endif ()
425+
426+ # altcertchains
427+ add_option (WOLFSSL_ALT_CERT_CHAINS
428+ "Enable support for Alternate certification chains (default: disabled)"
429+ "no" "yes;no" )
430+
431+ if (WOLFSSL_ALT_CERT_CHAINS)
432+ list (APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_ALT_CERT_CHAINS" )
433+ endif ()
434+
435+ # ip-alt-name
436+ add_option (WOLFSSL_IP_ALT_NAME
437+ "Enable support for IP alternative name (default: disabled)"
438+ "no" "yes;no" )
439+
440+ if (WOLFSSL_IP_ALT_NAME)
441+ list (APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_IP_ALT_NAME" )
442+ endif ()
443+
444+ # wolfSSH
445+ add_option (WOLFSSL_WOLFSSH
446+ "Enable support for wolfSSH (default: disabled)"
447+ "no" "yes;no" )
448+
449+ if (WOLFSSL_WOLFSSH)
450+ list (APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_WOLFSSH" )
451+ endif ()
452+
453+ if (WOLFSSL_WOLFSSH OR WOLFSSL_WPAS)
454+ list (APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_PUBLIC_MP" )
455+ endif ()
456+
380457# TODO: - DTLS-SCTP
381458# - DTLS multicast
382459# - OpenSSH
@@ -386,14 +463,11 @@ endif()
386463# - wpa_supplicant
387464# - Fortress
388465# - libwebsockets
389- # - IP alternative name
390466# - Qt
391467# - SSL bump
392468# - sniffer
393469# - Signal
394470# - OpenSSL coexist
395- # - OpenSSL compatibility all
396- # - OpenSSL compatibility extra
397471# - Max strength
398472
399473# Harden, enable Timing Resistance and Blinding by default
@@ -445,7 +519,6 @@ if (WOLFSSL_OPENSSLALL)
445519 "-DWOLFSSL_ERROR_CODE_OPENSSL" "-DWOLFSSL_CERT_NAME_ALL" )
446520endif ()
447521
448-
449522# TODO: - IPv6 test apps
450523
451524set (WOLFSSL_SLOW_MATH "yes" )
@@ -529,6 +602,15 @@ if(WOLFSSL_AESGCM)
529602 list (APPEND WOLFSSL_DEFINITIONS "-DHAVE_AESGCM" )
530603endif ()
531604
605+ if (WOLFSSL_QUIC)
606+ if (NOT WOLFSSL_TLS13)
607+ message (FATAL_ERROR "TLS 1.3 is disabled - necessary for QUIC" )
608+ endif ()
609+ if (NOT WOLFSSL_AESGCM)
610+ message (FATAL_ERROR "AES-GCM is disabled - necessary for QUIC" )
611+ endif ()
612+ endif ()
613+
532614# AES-SIV
533615add_option ("WOLFSSL_AESSIV"
534616 "Enable wolfSSL AES-SIV support (default: disabled)"
@@ -1435,7 +1517,6 @@ endif()
14351517
14361518# TODO: - TLS extensions
14371519# - Early data handshake
1438- # - wolfSSH options
14391520# - SCEP
14401521# - Secure remote password
14411522# - Indefinite length encoded messages
@@ -2232,6 +2313,7 @@ if(WOLFSSL_EXAMPLES)
22322313 tests/suites.c
22332314 tests/w64wrapper.c
22342315 tests/unit.c
2316+ tests/quic.c
22352317 examples/server/server.c
22362318 examples/client/client.c )
22372319 target_include_directories (unit_test PRIVATE
0 commit comments