Ingela/ssl/crl cache/otp 19712 - #10049
Conversation
7f81454 to
27092e4
Compare
CT Test Results 2 files 66 suites 27m 6s ⏱️ Results for commit c9244d1. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
f937d96 to
451b8ba
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors duplicate internal_active_n logic, adds configurable CRL cache eviction in the PKIX database, and updates related modules and documentation.
- Refactor internal_active_n to centralize its implementation in ssl_config.
- Introduce a max_crl_cache setting and eviction logic in ssl_pkix_db.
- Wire the new configuration through ssl_manager, ssl_crl_cache, and docs, and remove unused defines.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tls_gen_connection_1_3.erl | Refactored internal_active_n to use ssl_config |
| ssl_pkix_db.erl | Added add_crls/4 with cache size check and eviction logic |
| ssl_manager.erl | Propagate max_crl_db_entries and updated add_crls calls |
| ssl_internal.hrl | Removed duplicate INTERNAL_ACTIVE_N define |
| ssl_crl_cache.erl | Enabled cache insert on HTTP success |
| ssl_config.erl | Added DEFAULT_MAX_CRL_CACHE, get_max_crl_cache, and moved INTERNAL_ACTIVE_N |
| dtls_server_session_cache_sup.erl | Removed unused DEFAULT_MAX_SESSION_CACHE define |
| dtls_packet_demux.erl | Switched to ssl_config:get_internal_active_n |
| ssl_app.md | Documented the new max_crl_cache option |
Comments suppressed due to low confidence (2)
lib/ssl/doc/ssl_app.md:68
- Documented option name does not match the configuration function 'get_max_crl_cache' and expected env var 'max_crl_cache'. Please align the doc with the code.
- **`max_crl_cacche = pos_integer() <optional>`** - Sets the
lib/ssl/src/ssl_pkix_db.erl:381
- There are no tests covering the new CRL cache eviction behavior. Consider adding tests to validate that entries are evicted when the cache size exceeds the limit.
add_crls([_,_,_, {Cache, _} | _]= DB, Path, CRLs, MaxSize) ->
451b8ba to
4a9a18e
Compare
4a9a18e to
ad6b484
Compare
ad6b484 to
375a481
Compare
| case application:get_env(ssl, max_crl_cache) of | ||
| {ok, Size} when is_integer(Size) -> |
There was a problem hiding this comment.
| case application:get_env(ssl, max_crl_cache) of | |
| {ok, Size} when is_integer(Size) -> | |
| application_int(max_crl_cache, ?DEFAULT_MAX_CRL_CACHE) |
|
should target branch be maint? |
375a481 to
c9244d1
Compare
We decided not to, but it was when it was started. |
|
Closes in favour of hardening commit on #11478 |
Improve CRL caching. Also include a code health commit that avoids some code duplication.