Interface CtLogClient
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
HttpCtLogClient
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 TypeMethodDescriptionvoidclose()Releases resources held by this client (e.g., the underlying HTTP connection pool).logId()Returns the stable CT log identifier (64-character hex SHA-256 of the log's public key).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 benullchain- DER-encoded issuer chain, issuer certificate first; must not benulldeadline- latest time by which the submission must complete; must not benull- Returns:
- the SCT received from the log
- Throws:
CtSubmissionException- if the submission fails, times out, or the response is invalidNullPointerException- if any argument isnull
-
close
void close()Releases resources held by this client (e.g., the underlying HTTP connection pool).After
close(), calls tosubmit(byte[], List, Instant)throwIllegalStateException. Closing an already-closed client is a no-op.- Specified by:
closein interfaceAutoCloseable
-