public final class SimpleTrustResolver extends java.lang.Object implements TrustResolver
Constructor and Description |
---|
SimpleTrustResolver(java.lang.Iterable<java.security.cert.X509Certificate> trustedCertificates) |
Modifier and Type | Method and Description |
---|---|
static SimpleTrustResolver |
fromMetadata(java.lang.Iterable<MetadataObject> metadataObjects) |
static SimpleTrustResolver |
fromMetadataJson(java.lang.String metadataObjectJson) |
java.util.Optional<java.security.cert.X509Certificate> |
resolveTrustAnchor(java.security.cert.X509Certificate attestationCertificate,
java.util.List<java.security.cert.X509Certificate> caCertificateChain)
Resolve a trusted root anchor for the given attestation certificate and certificate chain
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolveTrustAnchor
public SimpleTrustResolver(java.lang.Iterable<java.security.cert.X509Certificate> trustedCertificates)
public static SimpleTrustResolver fromMetadata(java.lang.Iterable<MetadataObject> metadataObjects) throws java.security.cert.CertificateException
java.security.cert.CertificateException
public static SimpleTrustResolver fromMetadataJson(java.lang.String metadataObjectJson) throws java.io.IOException, java.security.cert.CertificateException
java.io.IOException
java.security.cert.CertificateException
public java.util.Optional<java.security.cert.X509Certificate> resolveTrustAnchor(java.security.cert.X509Certificate attestationCertificate, java.util.List<java.security.cert.X509Certificate> caCertificateChain)
TrustResolver
resolveTrustAnchor
in interface TrustResolver
attestationCertificate
- The attestation certificatecaCertificateChain
- Zero or more certificates, of which the first
has signed attestationCertificate
and each of the
remaining certificates has signed the certificate preceding it.attestationCertificate
, if one exists.