From 4948e4bbe5e5f019f50fd777e0cd03c1b334ad57 Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Tue, 2 May 2023 10:57:18 -0600 Subject: [PATCH] Don't build native QUIC implementation --- build/quiche.m4 | 2 - configure.ac | 34 +--- iocore/net/Makefile.am | 17 -- iocore/net/quic/Makefile.am | 294 -------------------------------- src/traffic_quic/Makefile.inc | 6 +- src/traffic_server/Makefile.inc | 5 +- 6 files changed, 7 insertions(+), 351 deletions(-) diff --git a/build/quiche.m4 b/build/quiche.m4 index bfe4c993194..367181f7b52 100644 --- a/build/quiche.m4 +++ b/build/quiche.m4 @@ -82,6 +82,4 @@ fi AC_CHECK_HEADER([quiche.h], [], [has_quiche=0]) AC_CHECK_LIB([quiche], quiche_connect, [:], [has_quiche=0]) ]) - -AM_CONDITIONAL([USE_QUICHE], [test $has_quiche -eq 1]) ]) diff --git a/configure.ac b/configure.ac index 3377dee2c89..7d5c17394c7 100644 --- a/configure.ac +++ b/configure.ac @@ -1291,30 +1291,6 @@ AM_CONDITIONAL([HAS_HKDF], [test "x$enable_hkdf" = "xyes"]) # Check for TLS 1.3 support TS_CHECK_CRYPTO_TLS13 -# Check for QUIC support -enable_quic=no -AC_MSG_CHECKING([whether APIs for QUIC are available]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[ - SSL_QUIC_METHOD var; - ]]) - ], - [ - AC_MSG_RESULT([yes]) - enable_quic=yes - _quic_saved_LIBS=$LIBS - TS_ADDTO(LIBS, [$OPENSSL_LIBS]) - AC_CHECK_FUNCS(SSL_set_quic_early_data_enabled) - LIBS=$_quic_saved_LIBS - ], - [ - AC_MSG_RESULT([no]) - ]) - -AM_CONDITIONAL([ENABLE_QUIC], [test "x$enable_quic" = "xyes"]) -TS_ARG_ENABLE_VAR([use], [quic]) -AC_SUBST(use_quic) - # Check for OCSP TS_CHECK_CRYPTO_OCSP @@ -1451,19 +1427,19 @@ TS_CHECK_BROTLI TS_CHECK_LUAJIT # Check for optional quiche library +enable_quic=no TS_CHECK_QUICHE if test "${has_quiche}" = "1"; then if test "$openssl_is_boringssl" = "1" ; then enable_quic=yes -## Doing these again for Quiche -AM_CONDITIONAL([ENABLE_QUIC], [test "x$enable_quic" = "xyes"]) -TS_ARG_ENABLE_VAR([use], [quic]) -AC_SUBST(use_quic) -AC_SUBST(has_quiche) else AC_MSG_ERROR([Use of BoringSSL is required if Quiche is used.]) fi fi +TS_ARG_ENABLE_VAR([use], [quic]) +AC_SUBST(use_quic) +AC_SUBST(has_quiche) +AM_CONDITIONAL([ENABLE_QUIC], [test "x$enable_quic" = "xyes"]) # Check for optional WAVM library TS_CHECK_WAVM diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am index 0297a50f0cd..028710424ad 100644 --- a/iocore/net/Makefile.am +++ b/iocore/net/Makefile.am @@ -214,7 +214,6 @@ libinknet_a_SOURCES = \ SNIActionPerformer.cc if ENABLE_QUIC -if USE_QUICHE libinknet_a_SOURCES += \ P_QUICClosedConCollector.h \ P_QUICPacketHandler.h \ @@ -228,22 +227,6 @@ libinknet_a_SOURCES += \ QUICNetVConnection_quiche.cc \ QUICNextProtocolAccept_quiche.cc \ QUICPacketHandler_quiche.cc -else -libinknet_a_SOURCES += \ - P_QUICClosedConCollector.h \ - P_QUICPacketHandler.h \ - P_QUICNet.h \ - P_QUICNetProcessor.h \ - P_QUICNetVConnection.h \ - P_QUICNextProtocolAccept.h \ - QUICClosedConCollector.cc \ - QUICPacketHandler.cc \ - QUICMultiCertConfigLoader.cc \ - QUICNet.cc \ - QUICNetProcessor.cc \ - QUICNetVConnection.cc \ - QUICNextProtocolAccept.cc -endif endif if BUILD_TESTS diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am index ed35743d315..42e75986ccd 100644 --- a/iocore/net/quic/Makefile.am +++ b/iocore/net/quic/Makefile.am @@ -34,25 +34,6 @@ AM_CPPFLAGS += \ noinst_LIBRARIES = libquic.a -if USE_QUICHE -else -if OPENSSL_IS_BORINGSSL -QUICPHProtector_impl = QUICPacketHeaderProtector_boringssl.cc -QUICPPProtector_impl = QUICPacketPayloadProtector_boringssl.cc -QUICTLS_impl = QUICTLS_boringssl.cc -QUICKeyGenerator_impl = QUICKeyGenerator_boringssl.cc -else -QUICPHProtector_impl = QUICPacketHeaderProtector_openssl.cc -QUICPPProtector_impl = QUICPacketPayloadProtector_openssl.cc -QUICTLS_impl = QUICTLS_openssl.cc -QUICKeyGenerator_impl = QUICKeyGenerator_openssl.cc -endif - -QLog_impl = qlog/QLogEvent.cc qlog/QLogFrame.cc qlog/QLog.cc -endif - - -if USE_QUICHE libquic_a_SOURCES = \ QUICApplication.cc \ QUICApplicationMap.cc \ @@ -68,288 +49,13 @@ libquic_a_SOURCES = \ QUICStreamManager_quiche.cc \ QUICStreamAdapter.cc \ QUICStreamVCAdapter.cc -else -libquic_a_SOURCES = \ - QUICGlobals.cc \ - QUICTypes.cc \ - QUICIntUtil.cc \ - QUICPacket.cc \ - QUICPacketFactory.cc \ - QUICFrame.cc \ - QUICFrameDispatcher.cc \ - QUICVersionNegotiator.cc \ - QUICLossDetector.cc \ - QUICStreamManager.cc \ - QUICStreamManager_native.cc \ - QUICNewRenoCongestionController.cc \ - QUICFlowController.cc \ - QUICStreamState.cc \ - QUICStreamAdapter.cc \ - QUICStreamVCAdapter.cc \ - QUICStream.cc \ - QUICStreamBase.cc \ - QUICHandshake.cc \ - QUICPacketHeaderProtector.cc \ - $(QUICPHProtector_impl) \ - QUICPacketPayloadProtector.cc \ - $(QUICPPProtector_impl) \ - QUICPacketProtectionKeyInfo.cc \ - QUICTLS.cc \ - $(QUICTLS_impl) \ - $(QUICKeyGenerator_impl) \ - QUICKeyGenerator.cc \ - QUICHKDF.cc \ - QUICTransportParameters.cc \ - QUICConnectionTable.cc \ - QUICAltConnectionManager.cc \ - QUICAckFrameCreator.cc \ - QUICConfig.cc \ - QUICDebugNames.cc \ - QUICApplication.cc \ - QUICApplicationMap.cc \ - QUICIncomingFrameBuffer.cc \ - QUICPacketReceiveQueue.cc \ - QUICPathManager.cc \ - QUICPathValidator.cc \ - QUICPinger.cc \ - QUICRetryIntegrityTag.cc \ - QUICResetTokenTable.cc \ - QUICFrameGenerator.cc \ - QUICFrameRetransmitter.cc \ - QUICAddrVerifyState.cc \ - QUICTransferProgressProvider.cc \ - QUICBidirectionalStream.cc \ - QUICCryptoStream.cc \ - QUICUnidirectionalStream.cc \ - QUICStreamFactory.cc \ - QUICPadder.cc \ - QUICContext.cc \ - QUICTokenCreator.cc \ - $(QLog_impl) -endif # # Check Programs # -if USE_QUICHE -else -check_PROGRAMS = \ - test_QUICAckFrameCreator \ - test_QUICAltConnectionManager \ - test_QUICFlowController \ - test_QUICFrame \ - test_QUICFrameDispatcher \ - test_QUICLossDetector \ - test_QUICHandshakeProtocol \ - test_QUICIncomingFrameBuffer \ - test_QUICInvariants \ - test_QUICKeyGenerator \ - test_QUICPacket \ - test_QUICPacketHeaderProtector \ - test_QUICPacketFactory \ - test_QUICPathValidator \ - test_QUICStream \ - test_QUICStreamManager \ - test_QUICStreamState \ - test_QUICTransportParameters \ - test_QUICType \ - test_QUICTypeUtil \ - test_QUICVersionNegotiator \ - test_QUICFrameRetransmitter \ - test_QUICAddrVerifyState \ - test_QUICPinger -endif TESTS = $(check_PROGRAMS) -test_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - -I$(abs_top_srcdir)/tests/include -O0 - -test_LDADD = \ - libquic.a \ - $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/iocore/eventsystem/libinkevent.a \ - $(top_builddir)/src/tscore/libtscore.la \ - $(top_builddir)/src/tscpp/util/libtscpputil.la \ - $(top_builddir)/proxy/ParentSelectionStrategy.o \ - $(top_builddir)/iocore/net/TLSKeyLogger.o \ - @HWLOC_LIBS@ @SWOC_LIBS@ @OPENSSL_LIBS@ @LIBPCRE@ @YAMLCPP_LIBS@ - -test_event_main_SOURCES = \ - ./test/event_processor_main.cc - -test_main_SOURCES = \ - ./test/main.cc - -test_QUICAckFrameCreator_CPPFLAGS = $(test_CPPFLAGS) -test_QUICAckFrameCreator_LDFLAGS = @AM_LDFLAGS@ -test_QUICAckFrameCreator_LDADD = $(test_LDADD) -test_QUICAckFrameCreator_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICAckFrameCreator.cc - -test_QUICAltConnectionManager_CPPFLAGS = $(test_CPPFLAGS) -test_QUICAltConnectionManager_LDFLAGS = @AM_LDFLAGS@ -test_QUICAltConnectionManager_LDADD = $(test_LDADD) -test_QUICAltConnectionManager_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICAltConnectionManager.cc - -test_QUICFlowController_CPPFLAGS = $(test_CPPFLAGS) -test_QUICFlowController_LDFLAGS = @AM_LDFLAGS@ -test_QUICFlowController_LDADD = $(test_LDADD) -test_QUICFlowController_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICFlowController.cc - -test_QUICFrame_CPPFLAGS = $(test_CPPFLAGS) -test_QUICFrame_LDFLAGS = @AM_LDFLAGS@ -test_QUICFrame_LDADD = $(test_LDADD) -test_QUICFrame_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICFrame.cc - -test_QUICFrameDispatcher_CPPFLAGS = $(test_CPPFLAGS) -test_QUICFrameDispatcher_LDFLAGS = @AM_LDFLAGS@ -test_QUICFrameDispatcher_LDADD = $(test_LDADD) -test_QUICFrameDispatcher_SOURCES = \ - $(test_event_main_SOURCES) \ - ./test/test_QUICFrameDispatcher.cc - -test_QUICLossDetector_CPPFLAGS = $(test_CPPFLAGS) -test_QUICLossDetector_LDFLAGS = @AM_LDFLAGS@ -test_QUICLossDetector_LDADD = $(test_LDADD) -test_QUICLossDetector_SOURCES = \ - $(test_event_main_SOURCES) \ - ./test/test_QUICLossDetector.cc - -test_QUICHandshakeProtocol_CPPFLAGS = $(test_CPPFLAGS) -test_QUICHandshakeProtocol_LDFLAGS = @AM_LDFLAGS@ -test_QUICHandshakeProtocol_LDADD = $(test_LDADD) -test_QUICHandshakeProtocol_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICHandshakeProtocol.cc - -test_QUICIncomingFrameBuffer_CPPFLAGS = $(test_CPPFLAGS) -test_QUICIncomingFrameBuffer_LDFLAGS = @AM_LDFLAGS@ -test_QUICIncomingFrameBuffer_LDADD = $(test_LDADD) -test_QUICIncomingFrameBuffer_SOURCES = \ - $(test_event_main_SOURCES) \ - ./test/test_QUICIncomingFrameBuffer.cc - -test_QUICInvariants_CPPFLAGS = $(test_CPPFLAGS) -test_QUICInvariants_LDFLAGS = @AM_LDFLAGS@ -test_QUICInvariants_LDADD = $(test_LDADD) -test_QUICInvariants_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICInvariants.cc - -test_QUICKeyGenerator_CPPFLAGS = $(test_CPPFLAGS) -test_QUICKeyGenerator_LDFLAGS = @AM_LDFLAGS@ -test_QUICKeyGenerator_LDADD = $(test_LDADD) -test_QUICKeyGenerator_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICKeyGenerator.cc - -test_QUICPacket_CPPFLAGS = $(test_CPPFLAGS) -test_QUICPacket_LDFLAGS = @AM_LDFLAGS@ -test_QUICPacket_LDADD = $(test_LDADD) -test_QUICPacket_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICPacket.cc - -test_QUICPacketFactory_CPPFLAGS = $(test_CPPFLAGS) -test_QUICPacketFactory_LDFLAGS = @AM_LDFLAGS@ -test_QUICPacketFactory_LDADD = $(test_LDADD) -test_QUICPacketFactory_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICPacketFactory.cc - -test_QUICPathValidator_CPPFLAGS = $(test_CPPFLAGS) -test_QUICPathValidator_LDFLAGS = @AM_LDFLAGS@ -test_QUICPathValidator_LDADD = $(test_LDADD) -test_QUICPathValidator_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICPathValidator.cc - -test_QUICPacketHeaderProtector_CPPFLAGS = $(test_CPPFLAGS) -test_QUICPacketHeaderProtector_LDFLAGS = @AM_LDFLAGS@ -test_QUICPacketHeaderProtector_LDADD = $(test_LDADD) -test_QUICPacketHeaderProtector_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICPacketHeaderProtector.cc - -test_QUICStream_CPPFLAGS = $(test_CPPFLAGS) -test_QUICStream_LDFLAGS = @AM_LDFLAGS@ -test_QUICStream_LDADD = $(test_LDADD) -test_QUICStream_SOURCES = \ - $(test_event_main_SOURCES) \ - ./test/test_QUICStream.cc - -test_QUICStreamManager_CPPFLAGS = $(test_CPPFLAGS) -test_QUICStreamManager_LDFLAGS = @AM_LDFLAGS@ -test_QUICStreamManager_LDADD = $(test_LDADD) -test_QUICStreamManager_SOURCES = \ - $(test_event_main_SOURCES) \ - ./test/test_QUICStreamManager.cc - -test_QUICStreamState_CPPFLAGS = $(test_CPPFLAGS) -test_QUICStreamState_LDFLAGS = @AM_LDFLAGS@ -test_QUICStreamState_LDADD = $(test_LDADD) -test_QUICStreamState_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICStreamState.cc - -test_QUICTransportParameters_CPPFLAGS = $(test_CPPFLAGS) -test_QUICTransportParameters_LDFLAGS = @AM_LDFLAGS@ -test_QUICTransportParameters_LDADD = $(test_LDADD) -test_QUICTransportParameters_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICTransportParameters.cc - -test_QUICType_CPPFLAGS = $(test_CPPFLAGS) -test_QUICType_LDFLAGS = @AM_LDFLAGS@ -test_QUICType_LDADD = $(test_LDADD) -test_QUICType_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICType.cc - -test_QUICTypeUtil_CPPFLAGS = $(test_CPPFLAGS) -test_QUICTypeUtil_LDFLAGS = @AM_LDFLAGS@ -test_QUICTypeUtil_LDADD = $(test_LDADD) -test_QUICTypeUtil_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICTypeUtil.cc - -test_QUICVersionNegotiator_CPPFLAGS = $(test_CPPFLAGS) -test_QUICVersionNegotiator_LDFLAGS = @AM_LDFLAGS@ -test_QUICVersionNegotiator_LDADD = $(test_LDADD) -test_QUICVersionNegotiator_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICVersionNegotiator.cc - -test_QUICFrameRetransmitter_CPPFLAGS = $(test_CPPFLAGS) -test_QUICFrameRetransmitter_LDFLAGS = @AM_LDFLAGS@ -test_QUICFrameRetransmitter_LDADD = $(test_LDADD) -test_QUICFrameRetransmitter_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICFrameRetransmitter.cc - -test_QUICAddrVerifyState_CPPFLAGS = $(test_CPPFLAGS) -test_QUICAddrVerifyState_LDFLAGS = @AM_LDFLAGS@ -test_QUICAddrVerifyState_LDADD = $(test_LDADD) -test_QUICAddrVerifyState_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICAddrVerifyState.cc - -test_QUICPinger_CPPFLAGS = $(test_CPPFLAGS) -test_QUICPinger_LDFLAGS = @AM_LDFLAGS@ -test_QUICPinger_LDADD = $(test_LDADD) -test_QUICPinger_SOURCES = \ - $(test_main_SOURCES) \ - ./test/test_QUICPinger.cc - # # clang-tidy # diff --git a/src/traffic_quic/Makefile.inc b/src/traffic_quic/Makefile.inc index daec6e4a83b..bc4d7ea5021 100644 --- a/src/traffic_quic/Makefile.inc +++ b/src/traffic_quic/Makefile.inc @@ -62,9 +62,5 @@ traffic_quic_traffic_quic_LDADD = \ @SWOC_LIBS@ \ @YAMLCPP_LIBS@ \ @OPENSSL_LIBS@ \ + @QUICHE_LIB@ \ @LIBPCRE@ - -if USE_QUICHE -traffic_quic_traffic_quic_LDADD += \ - $(QUICHE_LIB) -endif diff --git a/src/traffic_server/Makefile.inc b/src/traffic_server/Makefile.inc index 8c6f4a08d64..54469db2244 100644 --- a/src/traffic_server/Makefile.inc +++ b/src/traffic_server/Makefile.inc @@ -112,12 +112,9 @@ if ENABLE_QUIC traffic_server_traffic_server_LDADD += \ $(top_builddir)/proxy/http3/libhttp3.a \ $(top_builddir)/iocore/net/quic/libquic.a \ - $(top_builddir)/iocore/eventsystem/libinkevent.a -if USE_QUICHE -traffic_server_traffic_server_LDADD += \ + $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(QUICHE_LIB) endif -endif if ENABLE_IO_URING traffic_server_traffic_server_LDADD += \