Package com.yubico.fido.metadata
Class FidoMetadataDownloader.FidoMetadataDownloaderBuilder
java.lang.Object
com.yubico.fido.metadata.FidoMetadataDownloader.FidoMetadataDownloaderBuilder
- Enclosing class:
- FidoMetadataDownloader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStep 1: Set the legal header to expect from the FIDO Metadata Service.static classStep 2: Configure how to retrieve the FIDO Metadata Service trust root certificate when necessary.static classStep 3: Configure how to cache the trust root certificate.static classStep 4: Configure how to fetch the FIDO Metadata Service metadata BLOB.static classStep 5: Configure how to cache the metadata BLOB. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Useclockas the source of the current time for some application-level logic.trustHttpsCerts(@NonNull X509Certificate... certificates) Use the providedX509Certificates as trust roots for HTTPS downloads.useCrls(@NonNull Collection<CRL> crls) Use the provided CRLs.Use CRLs in the providedCertStore.
-
Method Details
-
build
-
clock
Useclockas the source of the current time for some application-level logic.This is primarily intended for testing.
The default is
Clock.systemUTC().- Parameters:
clock- aClockwhich the finishedFidoMetadataDownloaderwill use to tell the time.
-
useCrls
public FidoMetadataDownloader.FidoMetadataDownloaderBuilder useCrls(@NonNull @NonNull Collection<CRL> crls) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException Use the provided CRLs.CRLs will also be downloaded from distribution points if the
com.sun.security.enableCRLDPsystem property is set totrue(assuming the use of theCertPathValidatorimplementation from the SUN provider).- Throws:
InvalidAlgorithmParameterException- ifCertStore.getInstance(String, CertStoreParameters)does.NoSuchAlgorithmException- if a"Collection"typeCertStoreprovider is not available.- See Also:
-
useCrls
Use CRLs in the providedCertStore.CRLs will also be downloaded from distribution points if the
com.sun.security.enableCRLDPsystem property is set totrue(assuming the use of theCertPathValidatorimplementation from the SUN provider).- See Also:
-
trustHttpsCerts
public FidoMetadataDownloader.FidoMetadataDownloaderBuilder trustHttpsCerts(@NonNull @NonNull X509Certificate... certificates) Use the providedX509Certificates as trust roots for HTTPS downloads.This is primarily useful when setting
downloadTrustRootand/ordownloadBlobto download from custom servers instead of the defaults.If provided, these will be used for downloading
- the trust root certificate for the BLOB signature chain, and
- the metadata BLOB.
-