public final class StandardMetadataService
extends java.lang.Object
implements com.yubico.webauthn.attestation.MetadataService
Constructor and Description |
---|
StandardMetadataService() |
StandardMetadataService(AttestationResolver attestationResolver) |
Modifier and Type | Method and Description |
---|---|
static AttestationResolver |
createDefaultAttestationResolver() |
static AttestationResolver |
createDefaultAttestationResolver(TrustResolver trustResolver) |
static TrustResolver |
createDefaultTrustResolver() |
com.yubico.webauthn.attestation.Attestation |
getAttestation(@NonNull java.util.List<java.security.cert.X509Certificate> attestationCertificateChain)
Attempt to look up attestation for a chain of certificates
|
com.yubico.webauthn.attestation.Attestation |
getCachedAttestation(java.lang.String attestationCertificateFingerprint) |
public StandardMetadataService(AttestationResolver attestationResolver)
public StandardMetadataService() throws java.security.cert.CertificateException
java.security.cert.CertificateException
public static TrustResolver createDefaultTrustResolver() throws java.security.cert.CertificateException
java.security.cert.CertificateException
public static AttestationResolver createDefaultAttestationResolver(TrustResolver trustResolver) throws java.security.cert.CertificateException
java.security.cert.CertificateException
public static AttestationResolver createDefaultAttestationResolver() throws java.security.cert.CertificateException
java.security.cert.CertificateException
public com.yubico.webauthn.attestation.Attestation getCachedAttestation(java.lang.String attestationCertificateFingerprint)
public com.yubico.webauthn.attestation.Attestation getAttestation(@NonNull @NonNull java.util.List<java.security.cert.X509Certificate> attestationCertificateChain) throws java.security.cert.CertificateEncodingException
If there is a signature path from any trusted certificate to the first
certificate in attestationCertificateChain
, then the first
certificate in attestationCertificateChain
is matched
against the metadata registry to look up metadata for the device.
If the certificate chain is trusted but no metadata exists in the registry, the method returns a trusted attestation populated with information found embedded in the attestation certificate.
If the certificate chain is not trusted, the method returns an untrusted
attestation populated with transports
information found embedded in the attestation certificate.
If the certificate chain is empty, an untrusted empty attestation is returned.
getAttestation
in interface com.yubico.webauthn.attestation.MetadataService
attestationCertificateChain
- a certificate chain, where each
certificate in the list should be signed by the following certificate.java.security.cert.CertificateEncodingException
- if computation of the fingerprint
fails for any element of attestationCertificateChain
that
needs to be inspected