Interface CrlBuilder
public interface CrlBuilder
A fluent builder for a signed X.509 CRL that yields a standard
X509CRL.
Entries may be added individually or streamed from an Iterator so that
very large revocation sets are encoded without materializing them in memory.
The tbsCertList is signed by a caller supplied ContentSigner.
Instances are single-use and not thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionaddEntries(Iterator<CrlEntry> entries) Adds all entries produced by the given iterator, in order.Adds one revoked-certificate entry.addExtension(CertificateExtension extension) Adds an arbitrary CRL extension.authorityKeyIdentifier(byte[] keyIdentifier) Adds theAuthorityKeyIdentifierextension.build(ContentSigner signer) Signs the assembledtbsCertListwith the given signer and returns the resulting CRL.crlNumber(BigInteger crlNumber) Adds theCRLNumberextension.deltaCrlIndicator(BigInteger baseCrlNumber) Marks this as a delta CRL by adding theDeltaCRLIndicatorextension.issuer(X500Principal issuer) Sets the CRL issuer distinguished name (required).nextUpdate(Instant nextUpdate) SetsnextUpdate(optional but recommended).thisUpdate(Instant thisUpdate) SetsthisUpdate(required).
-
Method Details
-
issuer
Sets the CRL issuer distinguished name (required).- Parameters:
issuer- the issuer DN- Returns:
- this builder
-
thisUpdate
SetsthisUpdate(required).- Parameters:
thisUpdate- the time of this CRL- Returns:
- this builder
-
nextUpdate
SetsnextUpdate(optional but recommended).- Parameters:
nextUpdate- the time of the next scheduled CRL- Returns:
- this builder
-
crlNumber
Adds theCRLNumberextension.- Parameters:
crlNumber- the monotonically increasing CRL number- Returns:
- this builder
-
authorityKeyIdentifier
Adds theAuthorityKeyIdentifierextension.- Parameters:
keyIdentifier- the issuer subject-key-identifier bytes- Returns:
- this builder
-
deltaCrlIndicator
Marks this as a delta CRL by adding theDeltaCRLIndicatorextension.- Parameters:
baseCrlNumber- the base CRL number this delta is relative to- Returns:
- this builder
-
addEntry
Adds one revoked-certificate entry.- Parameters:
entry- the entry to add- Returns:
- this builder
-
addEntries
Adds all entries produced by the given iterator, in order.- Parameters:
entries- a (possibly large) stream of entries- Returns:
- this builder
-
addExtension
Adds an arbitrary CRL extension.- Parameters:
extension- the extension to add- Returns:
- this builder
-
build
Signs the assembledtbsCertListwith the given signer and returns the resulting CRL.- Parameters:
signer- the content signer supplying the signature and algorithm- Returns:
- the signed CRL
-