Class CmpService
java.lang.Object
zeroecho.pki.server.cmp.CmpService
Authenticated CMP enrollment, replacement, revocation and CA discovery.
Exact CRMF requests use the shared durable approval/signing coordinator.
Responses and nonce progression are persisted before delivery; pre-admission
authorization refusals have no durable transaction or domain side effect.
Thread-safe; cryptography and domain calls execute outside the control monitor.
-
Constructor Summary
ConstructorsConstructorDescriptionCmpService(ServerRealmContext realm) Creates a protocol adapter with the system clock and secure nonce source.CmpService(ServerRealmContext realm, Clock clock, SecureRandom random) Creates an adapter with explicit time and nonce capabilities. -
Method Summary
Modifier and TypeMethodDescriptionderegister(String label) Removes the durable binding.Looks up an endpoint.list()Returns immutable endpoints in deterministic registry order.byte[]processMessage(CmpEndpoint endpoint, byte[] pkiMessageDer) Processes one bounded protected request using the owned enrollment runtime.byte[]processMessage(CmpEndpoint endpoint, byte[] pkiMessageDer, CancellationSignal cancellation) Processes a request with cooperative cancellation.voidregister(CmpEndpoint endpoint) Registers a fully bound endpoint.
-
Constructor Details
-
CmpService
Creates a protocol adapter with the system clock and secure nonce source.- Parameters:
realm- lifecycle-owned realm and enrollment runtime
-
CmpService
Creates an adapter with explicit time and nonce capabilities.- Parameters:
realm- lifecycle-owned realmclock- authoritative protocol clockrandom- thread-safe cryptographic nonce and salt source
-
-
Method Details
-
register
Registers a fully bound endpoint.- Parameters:
endpoint- mandatory policy and authority binding
-
deregister
Removes the durable binding.- Parameters:
label- exact endpoint label- Returns:
- removed endpoint, if present
-
find
Looks up an endpoint.- Parameters:
label- exact endpoint label- Returns:
- current endpoint, if present
-
list
Returns immutable endpoints in deterministic registry order.- Returns:
- immutable endpoints in deterministic registry order
-
processMessage
public byte[] processMessage(CmpEndpoint endpoint, byte[] pkiMessageDer) throws CmpProtocolException Processes one bounded protected request using the owned enrollment runtime.- Parameters:
endpoint- exact route bindingpkiMessageDer- canonical protected DER message- Returns:
- protected response, durably retained after transaction admission
- Throws:
CmpProtocolException- for malformed, unauthenticated or unavailable work
-
processMessage
public byte[] processMessage(CmpEndpoint endpoint, byte[] pkiMessageDer, CancellationSignal cancellation) throws CmpProtocolException Processes a request with cooperative cancellation. Claimed signing work is reconciled by its original receipt rather than submitted again after timeout.- Parameters:
endpoint- exact route bindingpkiMessageDer- bounded protected DER requestcancellation- owned HTTP deadline/cancellation signal- Returns:
- same-mode protected response
- Throws:
CmpProtocolException- for malformed, unauthenticated or unavailable work
-