Class CmpTransport

java.lang.Object
zeroecho.pki.server.http.CmpTransport
All Implemented Interfaces:
AutoCloseable

public final class CmpTransport extends Object implements AutoCloseable
Lifecycle owner for the optional CMP RFC 4210/9480 HTTPS listener (RFC 6712 transport).

CMP uses signature or shared-secret protection inside the PKIMessage itself; the TLS layer provides confidentiality only. Client authentication at the TLS layer is therefore not required.

Usage: start(PkiServerConfiguration.CmpListener, ServerRealmContext, SecureRandom, ClassLoader, BooleanSupplier) returns a fully running transport; call shutdown(Duration) or close() to stop it.

Since:
1.0
  • Method Details

    • start

      public static CmpTransport start(PkiServerConfiguration.CmpListener configuration, ServerRealmContext realm, SecureRandom random, ClassLoader loader, BooleanSupplier ready)
      Starts one CMP listener over the lifecycle-owned realm and PKI session.
      Parameters:
      configuration - validated CMP listener configuration
      realm - shared lifecycle-owned realm
      random - cryptographically secure entropy source
      loader - provider service class loader
      ready - readiness predicate checked by request handlers
      Returns:
      started CMP listener lifecycle owner
      Throws:
      IllegalStateException - if the listener cannot be initialized
    • address

      public InetSocketAddress address()
      Returns the actual listener address, including an allocated ephemeral port.
      Returns:
      bound listener address
    • service

      public CmpService service()
      Returns the CMP service for administrative endpoint management.
      Returns:
      the CMP service holding the endpoint registry
    • quiesce

      public void quiesce()
      Rejects new protocol work.
    • shutdown

      public void shutdown(Duration graceful)
      Stops listener admission and the CMP lane executors.
      Parameters:
      graceful - maximum transport drain duration; whole seconds are passed to the listener
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable