SSL_CTX *ssl_quic_srv_new_ssl_ctx(void);
int qc_alloc_ssl_sock_ctx(struct quic_conn *qc, struct connection *conn);
int qc_ssl_provide_all_quic_data(struct quic_conn *qc, struct ssl_sock_ctx *ctx);
+int qc_ssl_do_hanshake(struct quic_conn *qc, struct ssl_sock_ctx *ctx);
static inline void qc_free_ssl_sock_ctx(struct ssl_sock_ctx **ctx)
{
/* TASK_HEAVY is set when received CRYPTO data have to be handled. */
if (HA_ATOMIC_LOAD(&tl->state) & TASK_HEAVY) {
+#ifdef HAVE_OPENSSL_QUIC
+ qc_ssl_do_hanshake(qc, qc->xprt_ctx);
+#else
qc_ssl_provide_all_quic_data(qc, qc->xprt_ctx);
+#endif
HA_ATOMIC_AND(&tl->state, ~TASK_HEAVY);
}
* connection for servers or start the mux for clients.
* Return 1 if succeeded, 0 if not.
*/
-static int qc_ssl_do_hanshake(struct quic_conn *qc, struct ssl_sock_ctx *ctx)
+int qc_ssl_do_hanshake(struct quic_conn *qc, struct ssl_sock_ctx *ctx)
{
int ret, ssl_err, state;
goto leave;
}
+#ifndef HAVE_OPENSSL_QUIC
/* Provide CRYPTO data to the TLS stack found at <data> with <len> as length
* from <qel> encryption level with <ctx> as QUIC connection context.
* Remaining parameter are there for debugging purposes.
TRACE_ENTER(QUIC_EV_CONN_SSLDATA, qc);
-#ifndef HAVE_OPENSSL_QUIC
if (SSL_provide_quic_data(ctx->ssl, level, data, len) != 1) {
TRACE_ERROR("SSL_provide_quic_data() error",
QUIC_EV_CONN_SSLDATA, qc, NULL, NULL, ctx->ssl);
goto leave;
}
-#endif
if (!qc_ssl_do_hanshake(qc, ctx))
goto leave;
TRACE_LEAVE(QUIC_EV_CONN_PHPKTS, qc);
return ret;
}
+#endif
/* Simple helper to set the specific OpenSSL/quictls QUIC API callbacks */
static int quic_ssl_set_tls_cbs(SSL *ssl)