Skip to content

Comments

Extend usability of CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR quirk#28015

Closed
DDvO wants to merge 2 commits intoopenssl:masterfrom
siemens:fix_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR
Closed

Extend usability of CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR quirk#28015
DDvO wants to merge 2 commits intoopenssl:masterfrom
siemens:fix_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR

Conversation

@DDvO
Copy link
Contributor

@DDvO DDvO commented Jul 10, 2025

As requested in #27888, allow setting the quirk option CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR,
which had been added for special 3GPP support, also from the cmp app.
Yet as discussed there, not doing this by default: only if OPENSSL_CMP_APP_ALLOW_UNSAFE is defined at compile time.

Also make sure that with this quirk option, the new TA(s) are used for whole transaction (also pkiconf)
and update and slightly improve its doc.

@DDvO DDvO added branch: master Applies to master branch approval: review pending This pull request needs review by a committer triaged: feature The issue/pr requests/adds a feature tests: exempted The PR is exempt from requirements for testing labels Jul 10, 2025
@DDvO DDvO requested a review from Copilot July 10, 2025 15:51

This comment was marked as outdated.

@DDvO DDvO requested a review from Copilot July 10, 2025 15:51
Copy link

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

This PR exposes the CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR quirk in the openssl cmp CLI (behind a compile‐time guard), ensures newly accepted trust anchors persist through the full transaction, and updates the related documentation.

  • Expose -ta_in_ip_extracerts CLI switch when built with OPENSSL_CMP_APP_ALLOW_UNSAFE
  • Persist self–issued extraCerts as trust anchors across all CMP messages in a transaction
  • Revise and expand documentation for the 3GPP TS 33.310 quirk option

Reviewed Changes

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

File Description
doc/man3/OSSL_CMP_CTX_new.pod Expanded and clarified the behavior of the PERMIT_TA_IN_EXTRACERTS_FOR_IR option.
doc/man1/openssl-cmp.pod.in Added -ta_in_ip_extracerts flag, its description, and version note behind a guard.
crypto/cmp/cmp_vfy.c After initial validation, cache self–issued extraCerts into the trust store for further messages.
apps/cmp.c Introduced opt_ta_in_ip_extracerts under OPENSSL_CMP_APP_ALLOW_UNSAFE and wired it into context setup and option parsing.
Comments suppressed due to low confidence (1)

apps/cmp.c:90

  • [nitpick] Consider adding a test case for the new -ta_in_ip_extracerts CLI flag to verify it correctly enables CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR in the context.
#ifdef OPENSSL_CMP_APP_ALLOW_UNSAFE

@DDvO DDvO force-pushed the fix_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR branch from 0237d1f to 8d5a972 Compare July 10, 2025 16:05
Copy link
Contributor

@shahsb shahsb left a comment

Choose a reason for hiding this comment

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

Consider adding a CMP_CTX_clear_extra_certs_cache(ctx) API for explicit cleanup (though not required in this PR).

@DDvO
Copy link
Contributor Author

DDvO commented Jul 28, 2025

Consider adding a CMP_CTX_clear_extra_certs_cache(ctx) API for explicit cleanup (though not required in this PR).

I do not see the need for this. The extraCertsIn field in the CMP context will be filled from the extraCerts of the first response message in a transaction.
When reusing a CMP context for a further transaction, anyway OSSL_CMP_CTX_reinit() needs to be called, which clear it.

@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/committers but the last update was 61 days ago

@DDvO DDvO requested a review from t8m October 16, 2025 18:24
@DDvO DDvO force-pushed the fix_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR branch from b16efa8 to 02e2081 Compare October 20, 2025 07:53
@DDvO
Copy link
Contributor Author

DDvO commented Oct 20, 2025

Rebased on latest master, also auto-squashing the fixup commits, which IMO are not of interest for reviewers.

@DDvO
Copy link
Contributor Author

DDvO commented Oct 20, 2025

I suppose the new CIFuzz failure is unrelated.
Looks like in this case I better should not have rebased on bleeding-edge master.

@DDvO DDvO force-pushed the fix_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR branch from 02e2081 to 34a0e0b Compare October 20, 2025 16:17
@DDvO
Copy link
Contributor Author

DDvO commented Oct 20, 2025

Looks like in this case I better should not have rebased on bleeding-edge master.

While following the latest reviewer suggestion, rebased again to hopefully get rid of the recent unrelated CI fuzz failure.

@DDvO DDvO requested a review from t8m October 22, 2025 06:06
@DDvO
Copy link
Contributor Author

DDvO commented Oct 24, 2025

@t8m did you see that I followed your change suggestion?
Would be nice if you can approve now.

@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

@DDvO DDvO force-pushed the fix_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR branch from 34a0e0b to 407b440 Compare December 3, 2025 10:30
@DDvO
Copy link
Contributor Author

DDvO commented Dec 3, 2025

Rebased to fix simple merge conflict.

Ping @t8m for checking the requested changes done and approval

@DDvO
Copy link
Contributor Author

DDvO commented Dec 3, 2025

Windoze CI failures are unrelated.

@DDvO
Copy link
Contributor Author

DDvO commented Dec 5, 2025

Rebased to fix simple doc merge conflict and removed from here the addtion
if (OSSL_CMP_MSG_get_bodytype(msg) == OSSL_CMP_PKIBODY_IP) in cmp_vfy.c
because this is now covered by #29302.

@DDvO
Copy link
Contributor Author

DDvO commented Dec 5, 2025

@t8m et al., can we please now get this PR done as well.

This will close #27888, and user @Krisscut is waiting for it.

t8m
t8m previously approved these changes Dec 5, 2025
@t8m t8m requested a review from a team December 5, 2025 10:37
@DDvO
Copy link
Contributor Author

DDvO commented Dec 8, 2025

Asking again @openssl/committers for 2nd approval.

beldmit
beldmit previously approved these changes Dec 8, 2025
Copy link
Member

@beldmit beldmit left a comment

Choose a reason for hiding this comment

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

LGTM

@beldmit beldmit added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Dec 8, 2025
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Dec 9, 2025
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

DDvO added 2 commits December 9, 2025 10:18
…st anchors in IP extracerts according to 3GPP TS 33.310

Fixes openssl#27888
@DDvO DDvO dismissed stale reviews from beldmit and t8m via 8d210a7 December 9, 2025 15:19
@DDvO DDvO force-pushed the fix_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR branch from 4e399cd to 8d210a7 Compare December 9, 2025 15:19
@DDvO
Copy link
Contributor Author

DDvO commented Dec 9, 2025

Unfortunately, this PR suffered from merge conflicts a few hours before it was allowed to get merged
due to the overall code re-formatting that took place this morning.

Moreover, now ./util/check-format-commit.sh, which is still in use for the CI, is of course unhappy with the new coding style.

Are re-approvals required here?

@t8m t8m closed this Dec 11, 2025
@t8m t8m reopened this Dec 11, 2025
@t8m
Copy link
Member

t8m commented Dec 11, 2025

I do not think we need re-approvals. New coding style check passes.

@t8m
Copy link
Member

t8m commented Dec 11, 2025

Merged to the master branch. Thank you for your contribution.

@t8m t8m closed this Dec 11, 2025
openssl-machine pushed a commit that referenced this pull request Dec 11, 2025
…transaction (also pkiconf); update doc

Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28015)
openssl-machine pushed a commit that referenced this pull request Dec 11, 2025
…st anchors in IP extracerts according to 3GPP TS 33.310

Fixes #27888

Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #28015)
cxx194832 pushed a commit to cxx194832/openssl that referenced this pull request Dec 12, 2025
…transaction (also pkiconf); update doc

Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#28015)
cxx194832 pushed a commit to cxx194832/openssl that referenced this pull request Dec 12, 2025
…st anchors in IP extracerts according to 3GPP TS 33.310

Fixes openssl#27888

Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#28015)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch tests: exempted The PR is exempt from requirements for testing triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants