Skip to content

Add CRMF ProtocolEncrKeyControl support - #2443

Open
sfeng-c wants to merge 1 commit into
bcgit:mainfrom
sfeng-c:add-protocol-encr-key-control
Open

Add CRMF ProtocolEncrKeyControl support#2443
sfeng-c wants to merge 1 commit into
bcgit:mainfrom
sfeng-c:add-protocol-encr-key-control

Conversation

@sfeng-c

@sfeng-c sfeng-c commented Sep 14, 2026

Copy link
Copy Markdown

Add support for the CRMF protocolEncrKey control defined in RFC 4211 Section 6.6.

RFC 4211 defines id-regCtrl-protocolEncrKey with a SubjectPublicKeyInfo parameter, for use when the CA needs to encrypt information in a response to the requester.

Reference:
https://www.rfc-editor.org/rfc/rfc4211.html#section-6.6

This change:

  • adds ProtocolEncrKeyControl backed by SubjectPublicKeyInfo;
  • updates CertificateRequestMessage.getControl() to recognize id_regCtrl_protocolEncrKey;
  • adds round-trip coverage to the existing CRMF tests.

Tested with:

gradlew.bat :pkix:test --tests org.bouncycastle.cert.crmf.test.AllTests

AI assistance disclosure

OpenAI Codex was used to assist with the implementation and testing of this contribution. I reviewed and verified the resulting changes.

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