maskit opened a new pull request, #14125:
URL: https://github.com/apache/trafficserver/pull/14125

   On OpenSSL builds, Traffic Server stops stapling OCSP responses for some TLS 
1.3 clients after the first OCSP refresh, even when certificate compression is 
not configured.
   
   ## Cause
   
   After every OCSP refresh attempt, successful or not, the refresh loop 
updates the compressed certificates of the context. On OpenSSL this called 
`SSL_CTX_compress_certs` for every algorithm Traffic Server supports. OpenSSL's 
default compression preference already lists every algorithm OpenSSL was built 
with, so this created pre-compressed certificates even when 
`proxy.config.ssl.server.cert_compression.algorithms` was unset.
   
   OpenSSL sends a pre-compressed certificate to any TLS 1.3 client that offers 
a matching algorithm. Pre-compressed certificates never carry the OCSP staple: 
OpenSSL builds them on a temporary connection that has no status request. So 
from the first refresh on, TLS 1.3 clients that offer certificate compression 
got no staple.
   
   Affected: builds against OpenSSL 3.2 or later with zlib, brotli or zstd 
support. The refresh step was added in PR 13284 and is not in 10.2.x.
   
   ## Fix
   
   On OpenSSL, an OCSP refresh no longer touches compressed certificates. 
Recompressing never helped there, since the staple is never part of them. 
BoringSSL builds still invalidate Traffic Server's compression cache on 
refresh, as before.
   
   Not changed here: when certificate compression is configured on OpenSSL, TLS 
1.3 clients that support compression still get no staple, because of how 
OpenSSL pre-compresses certificates.
   
   ## Testing
   
   New `tls/test_tls_ocsp_refresh_compression.py`: with compression not 
configured, it waits for a full refresh pass and then requires an uncompressed 
certificate with its staple for a TLS 1.3 `openssl s_client` that offers 
certificate compression. It skips unless both Traffic Server and `s_client` 
support zlib certificate compression.
   
   - OpenSSL 4.1.0 built with zlib, brotli and zstd: fails without the fix (the 
certificate arrives brotli-compressed, with no staple) and passes with it.
   - BoringSSL: passes. BoringSSL never compresses without configured 
algorithms, so the bug cannot occur there.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to