Interface CertificateChain
- All Known Implementing Classes:
CertificateChain.Impl
public interface CertificateChain
A node in the certificate chain.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic class -
Method Summary
Modifier and TypeMethodDescriptionThe certificate itself.children()The children of this certificate, or an empty list if this is a leaf certificate.static CertificateChainLoad certificate chain from the classpath, returning the root certificate.static CertificateChaingetRoot(Collection<X509Certificate> certificates) Takes an unordered collection of certificates and builds a tree structure.@Nullable CertificateChainissuer()The issuer of this certificate, or null if this is a root certificate.voidVerify that this certificate chain matches exactly with another one.static voidvisitAll(CertificateChain chain, CertificateChain.CertificateConsumer consumer) Recursively visit all certificates in the chain, including this one.
-
Method Details
-
certificate
X509Certificate certificate()The certificate itself. -
issuer
@Nullable CertificateChain issuer()The issuer of this certificate, or null if this is a root certificate. -
children
List<CertificateChain> children()The children of this certificate, or an empty list if this is a leaf certificate. -
verifyChainMatches
Verify that this certificate chain matches exactly with another one.- Parameters:
other- the other certificate chain- Throws:
SignatureVerificationFailure
-
visitAll
static void visitAll(CertificateChain chain, CertificateChain.CertificateConsumer consumer) throws SignatureVerificationFailure Recursively visit all certificates in the chain, including this one.- Throws:
SignatureVerificationFailure
-
getRoot
Load certificate chain from the classpath, returning the root certificate.- Throws:
IOException
-
getRoot
Takes an unordered collection of certificates and builds a tree structure.
-