SSL_CTX_get0_implemented_groups for TLS group metrics #12628
Merged
+92
−26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Building on PR #11844 which added TLS group metrics, this change uses SSL_CTX_get0_implemented_groups() to dynamically discover all supported TLS groups at initialization, including KEMs (Key Encapsulation Mechanisms) like X25519MLKEM768 and SecP256r1MLKEM768 that don't have standard NIDs defined in older OpenSSL versions. This fixes issue #12622 where KEM groups were being reported as OTHER instead of their actual group names. The implementation adds a new conditional compilation path that uses string-based group maps (similar to BoringSSL) when SSL_CTX_get0_implemented_groups is available, falling back to the NID-based approach for older OpenSSL 3.x versions.
Fixes: #12622
Here's example metrics from one of our proxies, with the stats obfuscated:
The OTHER stats are 0, as expected: