Skip to content

add support for ML-DSA and TPM2-held keys referenced via handle; OpenSSL 4.0 compat#119

Draft
DDvO wants to merge 27 commits into
masterfrom
extend_KEY_new
Draft

add support for ML-DSA and TPM2-held keys referenced via handle; OpenSSL 4.0 compat#119
DDvO wants to merge 27 commits into
masterfrom
extend_KEY_new

Conversation

@DDvO
Copy link
Copy Markdown
Member

@DDvO DDvO commented Apr 24, 2026

usage examples:

  • ./cmpClient imprint -section EJBCA -newkeytype "ML-DSA-65"
  • ./cmpClient imprint -section EJBCA -newkey "tpm2:handle=0x81000001"

On this occasion also:

  • various other small fixes and adaptations for OpenSSL 4.0 compatibility
  • fixes regarding the -tls_host option and SNI and related documentation
  • fixes on genericCMPClient_util.{c,h}
  • tweaks of demo_EJBCA
  • align 80-test_cmp_http.t with latest upstream OpenSSL version of that script, fixing CI hangs for OpenSSL 3.6+

@DDvO DDvO added the enhancement New feature or request label Apr 24, 2026
@DDvO DDvO requested a review from Copilot April 27, 2026 06:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support needed for newer key types (ML-DSA) and TPM2 handle-referenced keys in the cmpClient workflow by updating how new keys are created and slightly adjusting OpenSSL library detection behavior in the legacy Makefile.

Changes:

  • Switch key generation to KEY_new_ex(..., libctx) to support provider-/libctx-aware algorithms (e.g., ML-DSA) and non-file key references.
  • Adjust Makefile_v1 behavior when libcrypto cannot be found by disabling a previously-run diagnostic fallback call.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/cmpClient.c Uses KEY_new_ex() with the app libctx when generating a new key for enrollment flows.
Makefile_v1 Removes (comments out) a fallback call that previously re-ran OpenSSL lib detection to emit diagnostics before failing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile_v1 Outdated
Comment thread src/cmpClient.c
Comment thread src/cmpClient.c
@DDvO DDvO force-pushed the extend_KEY_new branch 3 times, most recently from 23d630d to 6faf9b2 Compare April 29, 2026 09:22
@DDvO DDvO requested a review from Copilot April 29, 2026 09:24
@DDvO DDvO changed the title add support for ML-DSA and TPM2-held keys referenced via handle add support for ML-DSA and TPM2-held keys referenced via handle; OpenSSL 4.0 compat Apr 29, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cmpClient.c Outdated
Comment thread src/cmpClient.c
Comment thread doc/cmpClient.pod Outdated
Comment thread doc/cmpClient.pod Outdated
Comment thread doc/cmpClient.pod Outdated
Comment thread README.md Outdated
@DDvO DDvO force-pushed the extend_KEY_new branch 3 times, most recently from aa867cb to a6dec70 Compare April 29, 2026 12:57
@DDvO DDvO force-pushed the extend_KEY_new branch 2 times, most recently from ccf639a to 62cb823 Compare May 11, 2026 17:35
@DDvO DDvO requested a review from Copilot May 11, 2026 17:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 19 changed files in this pull request and generated 8 comments.

Comment thread test/recipes/80-test_cmp_http.t
Comment thread test/recipes/80-test_cmp_http.t Outdated
Comment thread test/recipes/80-test_cmp_http.t
Comment thread test/recipes/80-test_cmp_http.t Outdated
Comment thread test/recipes/80-test_cmp_http.t Outdated
Comment thread include/genericCMPClient.h Outdated
Comment thread doc/cmpClient.pod Outdated
Comment thread doc/cmpClient.pod Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 25 changed files in this pull request and generated 5 comments.

Comment thread src/credential_loading.c Outdated
Comment thread src/credential_loading.c Outdated
Comment thread Makefile_v1 Outdated
Comment thread src/cmpClient.c
Comment thread src/genericCMPClient.c
Comment thread creds/docker/Docker_Playground_CMP.pem Fixed
Comment thread creds/docker/Docker_Playground_TLS.pem Fixed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 27 changed files in this pull request and generated 6 comments.

Comment thread src/genericCMPClient_util.c Outdated
Comment thread src/genericCMPClient.c
Comment thread src/credential_loading.c Outdated
Comment thread src/credential_loading.c Outdated
Comment thread src/credential_loading.c
Comment thread src/cmpClient.c
@DDvO DDvO force-pushed the extend_KEY_new branch 2 times, most recently from 2ca5abf to 374def0 Compare May 15, 2026 22:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 27 changed files in this pull request and generated no new comments.

DDvO added 16 commits May 18, 2026 19:08
…_server-docker-cn.txt, add EJBCA_TLS_SERVCER_CERTS
…_add_nconf_sk() makes empty exts NULL since OpenSSL 4.0
@DDvO DDvO force-pushed the extend_KEY_new branch from e2f85d4 to 01512f3 Compare May 18, 2026 17:09
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
26.0% Coverage on New Code (required ≥ 80%)
12.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants