org.bouncycastle.cert.dane.DANEEntryStoreBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcpkix-jdk15to18 Show documentation
Show all versions of bcpkix-jdk15to18 Show documentation
The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation. This jar contains APIs for JDK 1.5 to JDK 1.8. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.
package org.bouncycastle.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());
}
}