Skip to content

common/ssl_util: require OpenSSL >= 3.2 with a clear diagnostic - #602

Open
jumaho wants to merge 1 commit into
gyroidos:mainfrom
jumaho:bounds-safety-0-openssl
Open

common/ssl_util: require OpenSSL >= 3.2 with a clear diagnostic#602
jumaho wants to merge 1 commit into
gyroidos:mainfrom
jumaho:bounds-safety-0-openssl

Conversation

@jumaho

@jumaho jumaho commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

ssl_init() loads the libtpm2 provider via OSSL_PROVIDER_load_ex() (added in
OpenSSL 3.2) to pass the TPM primary-storage-key PIN through an OSSL_PARAM
array. On OpenSSL < 3.2 that function is not declared, so common/ssl_util.c
fails to compile with an implicit-function-declaration error.

Add a build-time check that emits a clear #error stating the OpenSSL >= 3.2
requirement, so the build fails with an obvious diagnostic instead of an obscure
compiler error.

ssl_init() passes the TPM primary storage key PIN to the libtpm2 provider
via OSSL_PROVIDER_load_ex(), an OpenSSL 3.2+ API.  On older OpenSSL the file
fails to compile with a cryptic implicit-function-declaration error; add an
explicit #error so the requirement is obvious.

Loading the provider without the PIN is deliberately not offered as a
fallback: it would defer a TPM auth failure to runtime for the exact
password-protected storage hierarchy the PIN exists for.

Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: Julian Horsch <julian.horsch@aisec.fraunhofer.de>
@jumaho
jumaho marked this pull request as ready for review July 21, 2026 10:36
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