Skip to content

Add OpenSSL TLS 1.3 early data (0-RTT) support#22802

Open
bukka wants to merge 1 commit into
php:masterfrom
bukka:openssl_tls_early_data
Open

Add OpenSSL TLS 1.3 early data (0-RTT) support#22802
bukka wants to merge 1 commit into
php:masterfrom
bukka:openssl_tls_early_data

Conversation

@bukka

@bukka bukka commented Jul 19, 2026

Copy link
Copy Markdown
Member

This builds on the session resumption support to let clients send and servers accept TLS 1.3 early data through the stream SSL context.

Clients set the early_data context option (a string) to send 0-RTT data, which is only sent when the resumed session allows it. Servers enable acceptance with max_early_data and receive the data through the early_data_cb callback, so nothing is buffered on the stream. The outcome is reported as accepted, rejected or not_sent in the early_data key of the crypto stream_get_meta_data() array.

Enabling early data also shares the server SSL_CTX across accepted connections and keeps the session cache on, both of which 0-RTT resumption requires.

This builds on the session resumption support to let clients send and
servers accept TLS 1.3 early data through the stream SSL context.

Clients set the early_data context option (a string) to send 0-RTT data,
which is only sent when the resumed session allows it. Servers enable
acceptance with max_early_data and receive the data through the
early_data_cb callback, so nothing is buffered on the stream. The outcome
is reported as 'accepted', 'rejected' or 'not_sent' in the early_data key
of the crypto stream_get_meta_data() array.

Enabling early data also shares the server SSL_CTX across accepted
connections and keeps the session cache on, both of which 0-RTT
resumption requires.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant