Resolve the CRL_REVOKED_SERIAL vs SimpleAttributeSet.Builder semantic mismatch #8

Open
opened 2026-03-24 18:01:12 +01:00 by galambos · 0 comments
Owner

Review and fix the semantic mismatch between CRL generation and attribute collection semantics. BcX509StatusObjectGenerator reads all values associated with CRL_REVOKED_SERIAL, which implies a multi-valued attribute model for CRL input.

At the same time, the current builder pattern used in SimpleAttributeSet is last-write-wins for repeated put(id, value), which is incompatible with repeated-value accumulation if the same AttributeId is meant to carry multiple serials. This is also relevant because DefaultIssuanceService enriches attributes using a builder with overwrite semantics.

Why this matters

If left ambiguous, CRL generation semantics may be accidentally wrong or become fragile when fed through builders rather than directly through pre-built maps.

Acceptance criteria

  • Decide explicitly whether repeated attribute ids are supported.
  • If yes, fix builder semantics and document them.
  • If no, redesign CRL revoked-entry input so it does not pretend to be multi-valued under one AttributeId.
  • Update JavaDoc and package JavaDoc accordingly.
  • Add targeted JUnit coverage for the chosen semantics.
Review and fix the semantic mismatch between CRL generation and attribute collection semantics. BcX509StatusObjectGenerator reads all values associated with CRL_REVOKED_SERIAL, which implies a multi-valued attribute model for CRL input. At the same time, the current builder pattern used in SimpleAttributeSet is last-write-wins for repeated put(id, value), which is incompatible with repeated-value accumulation if the same AttributeId is meant to carry multiple serials. This is also relevant because DefaultIssuanceService enriches attributes using a builder with overwrite semantics. ## Why this matters If left ambiguous, CRL generation semantics may be accidentally wrong or become fragile when fed through builders rather than directly through pre-built maps. ## Acceptance criteria - Decide explicitly whether repeated attribute ids are supported. - If yes, fix builder semantics and document them. - If no, redesign CRL revoked-entry input so it does not pretend to be multi-valued under one AttributeId. - Update JavaDoc and package JavaDoc accordingly. - Add targeted JUnit coverage for the chosen semantics.
galambos added this to the PKI Foundation Hardening and Regulated Operations Roadmap project 2026-03-24 18:56:06 +01:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Egothor/ZeroEcho#8