Interface CtLogClient

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
HttpCtLogClient

public interface CtLogClient extends AutoCloseable
Client for a single Certificate Transparency log endpoint.

Implementations submit pre-certificates to their configured CT log endpoint and return the resulting SCT. Submission is blocking within the caller-supplied deadline; the implementation is responsible for retrying transient failures within that window.

Thread safety

Implementations must be thread-safe; concurrent submit(byte[], List, Instant) calls are allowed.

Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases resources held by this client (e.g., the underlying HTTP connection pool).
    Returns the stable CT log identifier (64-character hex SHA-256 of the log's public key).
    submit(byte[] preCert, List<byte[]> chain, Instant deadline)
    Submits a pre-certificate and its issuer chain to the CT log and blocks until an SCT is received or the deadline elapses.
  • Method Details

    • logId

      String logId()
      Returns the stable CT log identifier (64-character hex SHA-256 of the log's public key).
      Returns:
      hex log ID
    • submit

      SignedCertificateTimestamp submit(byte[] preCert, List<byte[]> chain, Instant deadline) throws CtSubmissionException
      Submits a pre-certificate and its issuer chain to the CT log and blocks until an SCT is received or the deadline elapses.
      Parameters:
      preCert - DER-encoded pre-certificate; must not be null
      chain - DER-encoded issuer chain, issuer certificate first; must not be null
      deadline - latest time by which the submission must complete; must not be null
      Returns:
      the SCT received from the log
      Throws:
      CtSubmissionException - if the submission fails, times out, or the response is invalid
      NullPointerException - if any argument is null
    • close

      void close()
      Releases resources held by this client (e.g., the underlying HTTP connection pool).

      After close(), calls to submit(byte[], List, Instant) throw IllegalStateException. Closing an already-closed client is a no-op.

      Specified by:
      close in interface AutoCloseable