Skip to content

ocsp: stapling fast path and shared mutex#13097

Open
c-taylor wants to merge 1 commit intoapache:masterfrom
c-taylor:ocsp-stapling-fastpath
Open

ocsp: stapling fast path and shared mutex#13097
c-taylor wants to merge 1 commit intoapache:masterfrom
c-taylor:ocsp-stapling-fastpath

Conversation

@c-taylor
Copy link
Copy Markdown

Replace the ink_mutex in OCSP stapling with ts::bravo::shared_mutex to allow true reader concurrency on the TLS handshake hot path. BRAVO provides a lock-free fast path for readers via per-thread atomic slots, avoiding the shared counter bounce of std::shared_mutex.

Skip the SSL_get_certificate() call in the OCSP stapling callback when only one certificate exists in the map, avoiding a DER re-parse on every handshake. On older Intel systems this gave +5% HS/sec

Give certinfo a proper destructor to consolidate resource cleanup and fix two pre-existing leaks (cid and BoringSSL cert ref). Fix a pre-existing bug where the error path in ssl_stapling_init_cert could delete a certinfo_map still owned by the SSL_CTX.

@c-taylor c-taylor changed the title ocsp: replace stapling_mutex with bravo shared_mutex ocsp: stapling fast path and shared mutex Apr 17, 2026
Replace the ink_mutex in OCSP stapling with ts::bravo::shared_mutex
to allow true reader concurrency on the TLS handshake hot path.
BRAVO provides a lock-free fast path for readers via per-thread
atomic slots, avoiding the shared counter bounce of std::shared_mutex.

Skip the SSL_get_certificate() call in the OCSP stapling callback
when only one certificate exists in the map, avoiding a DER
re-parse on every handshake.

Give certinfo a proper destructor to consolidate resource cleanup
and fix two pre-existing leaks (cid and BoringSSL cert ref). Fix a
pre-existing bug where the error path in ssl_stapling_init_cert
could delete a certinfo_map still owned by the SSL_CTX.
@c-taylor c-taylor force-pushed the ocsp-stapling-fastpath branch from ffe36cf to 38fdcf8 Compare April 17, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant