Class SimpleTrustResolver
- java.lang.Object
-
- com.yubico.webauthn.attestation.resolver.SimpleTrustResolver
-
- All Implemented Interfaces:
TrustResolver
public final class SimpleTrustResolver extends java.lang.Object implements TrustResolver
Assesses whether an argument certificate can be trusted, and if so, by what trusted root certificate.
-
-
Constructor Summary
Constructors Constructor Description SimpleTrustResolver(java.lang.Iterable<java.security.cert.X509Certificate> trustedCertificates)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.yubico.webauthn.attestation.TrustResolver
resolveTrustAnchor
-
-
-
-
Method Detail
-
fromMetadata
public static SimpleTrustResolver fromMetadata(java.lang.Iterable<MetadataObject> metadataObjects) throws java.security.cert.CertificateException
- Throws:
java.security.cert.CertificateException
-
fromMetadataJson
public static SimpleTrustResolver fromMetadataJson(java.lang.String metadataObjectJson) throws java.io.IOException, java.security.cert.CertificateException
- Throws:
java.io.IOException
java.security.cert.CertificateException
-
resolveTrustAnchor
public java.util.Optional<java.security.cert.X509Certificate> resolveTrustAnchor(java.security.cert.X509Certificate attestationCertificate, java.util.List<java.security.cert.X509Certificate> caCertificateChain)
Description copied from interface:TrustResolver
Resolve a trusted root anchor for the given attestation certificate and certificate chain- Specified by:
resolveTrustAnchor
in interfaceTrustResolver
- Parameters:
attestationCertificate
- The attestation certificatecaCertificateChain
- Zero or more certificates, of which the first has signedattestationCertificate
and each of the remaining certificates has signed the certificate preceding it.- Returns:
- A trusted root certificate from which there is a signature path to
attestationCertificate
, if one exists.
-
-