mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
MINOR: quic: Set the QUIC connection as extra data before calling SSL_set_quic_method()
This patch is required for the QUIC OpenSSL wrapper, and does not break anything for the other TLS stacks with their own QUIC support (quictls for instance). The implementation of SSL_set_quic_method() needs to access the quic_conn object to store data within. But SSL_set_quic_method() is only aware of the SSL session object. This is the reason why it is required to set the quic_conn object as extra data to the SSL session object before calling SSL_set_quic_method() so that it can be retrieve by SSL_set_quic_method().
This commit is contained in:
parent
85d763b11e
commit
039f5a8786
@ -6668,8 +6668,8 @@ static int qc_ssl_sess_init(struct quic_conn *qc, SSL_CTX *ssl_ctx, SSL **ssl)
|
||||
goto retry;
|
||||
}
|
||||
|
||||
if (!SSL_set_quic_method(*ssl, &ha_quic_method) ||
|
||||
!SSL_set_ex_data(*ssl, ssl_qc_app_data_index, qc)) {
|
||||
if (!SSL_set_ex_data(*ssl, ssl_qc_app_data_index, qc) ||
|
||||
!SSL_set_quic_method(*ssl, &ha_quic_method)) {
|
||||
SSL_free(*ssl);
|
||||
*ssl = NULL;
|
||||
if (!retry--)
|
||||
|
Loading…
Reference in New Issue
Block a user