Skip to content

Commit f03f10b

Browse files
committed
tlshd: use gnutls_handshake_write() for Session Ticket processing in quic
When retrieving session data, GnuTLS must not run a full gnutls_handshake() while processing a TLS Session Ticket message. The existing code called quic_handshake_process(), which internally invoked gnutls_handshake() and caused failures with the latest GnuTLS versions. Fix this by calling gnutls_handshake_write() directly in quic_session_get_data() when handling the Session Ticket message. Signed-off-by: Xin Long <[email protected]>
1 parent 1fee064 commit f03f10b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tlshd/quic.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,10 @@ static void tlshd_quic_recv_session_ticket(struct tlshd_quic_conn *conn)
697697
return;
698698

699699
/* process new session ticket msg and get the generated session data */
700-
if (quic_handshake_crypto_data(conn, QUIC_CRYPTO_APP, conn->ticket, len)) {
700+
ret = gnutls_handshake_write(session, GNUTLS_ENCRYPTION_LEVEL_APPLICATION,
701+
conn->ticket, len);
702+
if (ret && gnutls_error_is_fatal(ret)) {
703+
tlshd_log_gnutls_error(ret);
701704
conn->errcode = EACCES;
702705
return;
703706
}

0 commit comments

Comments
 (0)