]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: QUIC openssl wrapper implementation
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 2 Jun 2023 14:15:35 +0000 (16:15 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 21 Jul 2023 13:53:40 +0000 (15:53 +0200)
commit1b03f8016dfb95dab11f028cc128ba0f3bfac045
tree486f785f8178116c4f3dd15f3961816d0ec6a947
parentff1c803279cfc8bdee8f2e13798cd3e4d99762c0
MINOR: quic: QUIC openssl wrapper implementation

Highly inspired from nginx openssl wrapper code.

This wrapper implement this list of functions:

   SSL_set_quic_method(),
   SSL_quic_read_level(),
   SSL_quic_write_level(),
   SSL_set_quic_transport_params(),
   SSL_provide_quic_data(),
   SSL_process_quic_post_handshake()

and SSL_QUIC_METHOD QUIC specific bio method which are also implemented by quictls
to support QUIC from OpenSSL. So, its aims is to support QUIC from a standard OpenSSL
stack without QUIC support. It relies on the OpenSSL keylog feature to retreive
the secrets derived by the OpenSSL stack during a handshake and to pass them to
the ->set_encryption_secrets() callback as this is done by quictls. It makes
usage of a callback (quic_tls_compat_msg_callback()) to handle some TLS messages
only on the receipt path. Some of them must be passed to the ->add_handshake_data()
callback as this is done with quictls to be sent to the peer as CRYPTO data.
quic_tls_compat_msg_callback() callback also sends the received TLS alert with
->send_alert() callback.

AES 128-bits with CCM mode is not supported at this time. It is often disabled by
the OpenSSL stack, but as it can be enabled by "ssl-default-bind-ciphersuites",
the wrapper will send a TLS alerts (Handhshake failure) if this algorithm is
negotiated between the client and the server.

0rtt is also not supported by this wrapper.
include/haproxy/quic_conn-t.h
include/haproxy/quic_openssl_compat-t.h [new file with mode: 0644]
include/haproxy/quic_openssl_compat.h [new file with mode: 0644]
src/quic_openssl_compat.c [new file with mode: 0644]