org.spongycastle.cert.dane.DANEEntryStoreBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pkix Show documentation
Show all versions of pkix Show documentation
Spongy Castle is a package-rename (org.bouncycastle.* to org.spongycastle.*) of Bouncy Castle
intended for the Android platform. Android unfortunately ships with a stripped-down version of
Bouncy Castle, which prevents easy upgrades - Spongy Castle overcomes this and provides a full,
up-to-date version of the Bouncy Castle cryptographic libs.
The newest version!
package org.spongycastle.cert.dane;
/**
* Builder for the DANECertificateStore.
*/
public class DANEEntryStoreBuilder
{
private final DANEEntryFetcherFactory daneEntryFetcher;
public DANEEntryStoreBuilder(DANEEntryFetcherFactory daneEntryFetcher)
{
this.daneEntryFetcher = daneEntryFetcher;
}
/**
* Build a DANECertificateStore from the provided domainName details.
*
* @param domainName the domain name to look up the _smimecert entries in.
* @return a Store of DANEEntry representing the _smimecert entries containing certificates.
* @throws DANEException in the case of a DNS issue or encoding issue with a DNS record.
*/
public DANEEntryStore build(String domainName)
throws DANEException
{
return new DANEEntryStore(daneEntryFetcher.build(domainName).getEntries());
}
}