Top Description Fields Constructors Methods
org.bouncycastle.cert.dane

public Class DANEEntry

extends Object
Class Inheritance
Imports
java.io.IOException, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.util.Arrays

Carrier class for a DANE entry.

Field Summary

Modifier and TypeField and Description
pack-priv static final int
public static final int
public static final int
public static final int
public static final int
private final X509CertificateHolder
private final String
private final byte[]
pack-priv static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv
DANEEntry(String domainName, byte[] flags, X509CertificateHolder certHolder)

public
DANEEntry(String domainName, byte[] data)

Method Summary

Modifier and TypeMethod and Description
public X509CertificateHolder

Returns:

the entry's certificate.
getCertificate
()

Return the certificate associated with this entry.

public String
public byte[]
public byte[]

Returns:

byte array representing the full data string.
getRDATA
()

Return the full data string as it would appear in the DNS record - flags + encoding

public static boolean

Returns:

true if flags indicate a valid certificate, false otherwise.
isValidCertificate
(byte[]
the byte string of interest.
data
)

Return true if the byte string has the correct flag bytes to indicate a certificate entry.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CERT_USAGEback to summary
pack-priv static final int CERT_USAGE
CERT_USAGE_ACCEPTback to summary
public static final int CERT_USAGE_ACCEPT
CERT_USAGE_CAback to summary
public static final int CERT_USAGE_CA
CERT_USAGE_PKIX_VALIDATEback to summary
public static final int CERT_USAGE_PKIX_VALIDATE
CERT_USAGE_TRUST_ANCHORback to summary
public static final int CERT_USAGE_TRUST_ANCHOR
certHolderback to summary
private final X509CertificateHolder certHolder
domainNameback to summary
private final String domainName
flagsback to summary
private final byte[] flags
MATCHING_TYPEback to summary
pack-priv static final int MATCHING_TYPE
SELECTORback to summary
pack-priv static final int SELECTOR

Constructor Detail

DANEEntryback to summary
pack-priv DANEEntry(String domainName, byte[] flags, X509CertificateHolder certHolder)
DANEEntryback to summary
public DANEEntry(String domainName, byte[] data) throws IOException

Method Detail

getCertificateback to summary
public X509CertificateHolder getCertificate()

Return the certificate associated with this entry.

Returns:X509CertificateHolder

the entry's certificate.

getDomainNameback to summary
public String getDomainName()
getFlagsback to summary
public byte[] getFlags()
getRDATAback to summary
public byte[] getRDATA() throws IOException

Return the full data string as it would appear in the DNS record - flags + encoding

Returns:byte[]

byte array representing the full data string.

Exceptions
IOException:
if there is an issue encoding the certificate inside this entry.
isValidCertificateback to summary
public static boolean isValidCertificate(byte[] data)

Return true if the byte string has the correct flag bytes to indicate a certificate entry.

Parameters
data:byte[]

the byte string of interest.

Returns:boolean

true if flags indicate a valid certificate, false otherwise.