Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20348)
*/
QUIC_CHANNEL *ch;
+ /* The mutex we give to the QUIC channel. */
+ CRYPTO_RWLOCK *mutex;
+
/* SSL_CTX for creating the underlying TLS connection */
SSL_CTX *ctx;
srv->args = *args;
+ if ((srv->mutex = CRYPTO_THREAD_lock_new()) == NULL)
+ goto err;
+
srv->ctx = SSL_CTX_new_ex(srv->args.libctx, srv->args.propq, TLS_method());
if (srv->ctx == NULL)
goto err;
ch_args.libctx = srv->args.libctx;
ch_args.propq = srv->args.propq;
ch_args.tls = srv->tls;
+ ch_args.mutex = srv->mutex;
ch_args.is_server = 1;
if ((srv->ch = ossl_quic_channel_new(&ch_args)) == NULL)
BIO_free(srv->args.net_wbio);
SSL_free(srv->tls);
SSL_CTX_free(srv->ctx);
+ CRYPTO_THREAD_lock_free(srv->mutex);
OPENSSL_free(srv);
}