diff --git a/iocore/net/quic/QUICConfig.cc b/iocore/net/quic/QUICConfig.cc index aec4f137bc1..171725de350 100644 --- a/iocore/net/quic/QUICConfig.cc +++ b/iocore/net/quic/QUICConfig.cc @@ -53,17 +53,6 @@ quic_new_ssl_ctx() // QUIC Transport Parameters are accessible with SSL_set_quic_transport_params and SSL_get_peer_quic_transport_params #endif -#ifdef SSL_MODE_QUIC_HACK - // tatsuhiro-t's custom OpenSSL for QUIC draft-13 - // https://github.com/tatsuhiro-t/openssl/tree/quic-draft-13 - SSL_CTX_set_mode(ssl_ctx, SSL_MODE_QUIC_HACK); - SSL_CTX_add_custom_ext(ssl_ctx, QUICTransportParametersHandler::TRANSPORT_PARAMETER_ID, - SSL_EXT_TLS_ONLY | SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS, - &QUICTransportParametersHandler::add, &QUICTransportParametersHandler::free, nullptr, - &QUICTransportParametersHandler::parse, nullptr); - -#endif - return ssl_ctx; } @@ -93,11 +82,9 @@ quic_init_client_ssl_ctx(const QUICConfigParams *params) SSL_CTX_sess_set_new_cb(ssl_ctx.get(), QUIC::ssl_client_new_session); } -#ifdef SSL_MODE_QUIC_HACK if (params->client_keylog_file() != nullptr) { SSL_CTX_set_keylog_callback(ssl_ctx.get(), QUIC::ssl_client_keylog_cb); } -#endif return ssl_ctx; } diff --git a/iocore/net/quic/QUICTransportParameters.cc b/iocore/net/quic/QUICTransportParameters.cc index c11345818f2..72d7f6de6c2 100644 --- a/iocore/net/quic/QUICTransportParameters.cc +++ b/iocore/net/quic/QUICTransportParameters.cc @@ -418,49 +418,3 @@ QUICTransportParametersInEncryptedExtensions::_validate_parameters(QUICVersion v return 0; } - -#ifndef OPENSSL_IS_BORINGSSL - -// -// QUICTransportParametersHandler -// - -int -QUICTransportParametersHandler::add(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char **out, size_t *outlen, - X509 *x, size_t chainidx, int *al, void *add_arg) -{ - QUICTLS *qtls = static_cast(SSL_get_ex_data(s, QUIC::ssl_quic_tls_index)); - *out = reinterpret_cast(ats_malloc(TRANSPORT_PARAMETERS_MAXIMUM_SIZE)); - qtls->local_transport_parameters()->store(const_cast(*out), reinterpret_cast(outlen)); - - return 1; -} - -void -QUICTransportParametersHandler::free(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char *out, void *add_arg) -{ - ats_free(const_cast(out)); -} - -int -QUICTransportParametersHandler::parse(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char *in, size_t inlen, - X509 *x, size_t chainidx, int *al, void *parse_arg) -{ - QUICTLS *qtls = static_cast(SSL_get_ex_data(s, QUIC::ssl_quic_tls_index)); - const QUICConnection *qc = static_cast(SSL_get_ex_data(s, QUIC::ssl_quic_qc_index)); - QUICVersion version = qc->negotiated_version(); - switch (context) { - case SSL_EXT_CLIENT_HELLO: - qtls->set_remote_transport_parameters(std::make_shared(in, inlen, version)); - break; - case SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS: - qtls->set_remote_transport_parameters(std::make_shared(in, inlen, version)); - break; - default: - // Do nothing - break; - } - - return 1; -} -#endif diff --git a/iocore/net/quic/QUICTransportParameters.h b/iocore/net/quic/QUICTransportParameters.h index 72533843105..4e4cae43fea 100644 --- a/iocore/net/quic/QUICTransportParameters.h +++ b/iocore/net/quic/QUICTransportParameters.h @@ -139,15 +139,3 @@ class QUICTransportParametersInEncryptedExtensions : public QUICTransportParamet std::ptrdiff_t _parameters_offset(const uint8_t *buf) const override; int _validate_parameters(QUICVersion version) const override; }; - -class QUICTransportParametersHandler -{ -public: - static constexpr int TRANSPORT_PARAMETER_ID = 0xffa5; - - static int add(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char **out, size_t *outlen, X509 *x, - size_t chainidx, int *al, void *add_arg); - static void free(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char *out, void *add_arg); - static int parse(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char *in, size_t inlen, X509 *x, - size_t chainidx, int *al, void *parse_arg); -}; diff --git a/iocore/net/quic/QUICTypes.h b/iocore/net/quic/QUICTypes.h index 50e87525f61..8b1ac9b351c 100644 --- a/iocore/net/quic/QUICTypes.h +++ b/iocore/net/quic/QUICTypes.h @@ -50,7 +50,6 @@ using QUICFrameId = uint64_t; // Note: Prefix for drafts (0xff000000) + draft number // Note: Fix "Supported Version" field in test case of QUICPacketFactory_Create_VersionNegotiationPacket // Note: Fix QUIC_ALPN_PROTO_LIST in QUICConfig.cc -// Note: Change ExtensionType (QUICTransportParametersHandler::TRANSPORT_PARAMETER_ID) if it's changed constexpr QUICVersion QUIC_SUPPORTED_VERSIONS[] = { 0xff00001d, 0xff00001b,