feat: display OpenSSL CPU hardware-acceleration feature flags at startup#963
Open
serene-kitfisto-8899 wants to merge 2 commits into
Open
feat: display OpenSSL CPU hardware-acceleration feature flags at startup#963serene-kitfisto-8899 wants to merge 2 commits into
serene-kitfisto-8899 wants to merge 2 commits into
Conversation
Add cpu_features_info() to openssl_providers.rs that calls OpenSSL_version(OPENSSL_CPU_INFO=9) and decodes the raw bitmask string into human-readable flag names logged at INFO level immediately after the existing OpenSSL version line. Architectures supported: - x86_64: 5×u64 ia32cap words (CPUID leaves 1, 7.0, 7.1, 24) decoded to named flags: MMX, SSE2, AES-NI, PCLMULQDQ, AVX, AVX2, SHA, VAES, RDRAND, AVX512F, etc. - AArch64: 1×u32 armcap word decoded to ARMV8_AES, ARMV8_SHA256, ARMV8_SHA512, ARMV8_SVE, etc. - PowerPC: 1×u32 ppccap word decoded to PPC_ALTIVEC, PPC_CRYPTO207, etc. - s390x / RISC-V / other: raw OpenSSL string logged verbatim. No new dependencies introduced. OPENSSL_CPU_INFO constant value (9) is used as a raw c_int because openssl-sys does not yet expose it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Log human-readable OpenSSL CPU hardware-acceleration feature flags at KMS startup for compliance and audit purposes.
Changes
crate/server/src/openssl_providers.rs: Addcpu_features_info() -> Stringthat callsOpenSSL_version(OPENSSL_CPU_INFO=9)(rawc_int;openssl-sysdoes not expose this constant), strips theCPUINFO:prefix and decodes the bitmask per architecture:Example output
Notes
--infoflag (lightweight probe mode) since it runs before provider loading.