org.minidns.record

## Class TLSA

- java.lang.Object
- - org.minidns.record.Data
  - - org.minidns.record.TLSA

-     public class TLSA
      extends Data

  DNS TLSA record payload for TLS certificate association.
  Associates TLS certificates with domain names for DANE-based authentication of TLS services.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TLSA.CertUsage`
    `static class` | `TLSA.MatchingType`
    `static class` | `TLSA.Selector`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `TLSA.CertUsage` | `certUsage`
    `byte` | `certUsageByte` The provided association that will be used to match the certificate presented in the TLS handshake.
    `TLSA.MatchingType` | `matchingType`
    `byte` | `matchingTypeByte` How the certificate association is presented.
    `TLSA.Selector` | `selector`
    `byte` | `selectorByte` Which part of the TLS certificate presented by the server will be matched against the association data.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TLSA(byte certUsageByte, byte selectorByte, byte matchingTypeByte, byte[] certificateAssociation)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `certificateAssociationEquals(byte[] otherCertificateAssociation)`
    `byte[]` | `getCertificateAssociation()`
    `Record.TYPE` | `getType()` The payload type.
    `static TLSA` | `parse(DataInputStream dis, int length)`
    `void` | `serialize(DataOutputStream dos)` The internal method used to serialize Data subclasses.
    `String` | `toString()`

    - ### Methods inherited from class org.minidns.record.Data

      `equals, hashCode, length, toByteArray, toOutputStream, toOutputStream`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### certUsage

          public final TLSA.CertUsage certUsage

    - #### certUsageByte

          public final byte certUsageByte

      The provided association that will be used to match the certificate presented in the TLS handshake.

    - #### matchingType

          public final TLSA.MatchingType matchingType

    - #### matchingTypeByte

          public final byte matchingTypeByte

      How the certificate association is presented.

    - #### selector

          public final TLSA.Selector selector

    - #### selectorByte

          public final byte selectorByte

      Which part of the TLS certificate presented by the server will be matched against the association data.

  - ### Constructor Detail

    - #### TLSA

          TLSA(byte certUsageByte,
               byte selectorByte,
               byte matchingTypeByte,
               byte[] certificateAssociation)

  - ### Method Detail

    - #### certificateAssociationEquals

          public boolean certificateAssociationEquals(byte[] otherCertificateAssociation)

    - #### getCertificateAssociation

          public byte[] getCertificateAssociation()

    - #### getType

          public Record.TYPE getType()

      Description copied from class: `Data`
      The payload type.
      Specified by:
        `getType` in class `Data`
      Returns:
        The payload type.

    - #### parse

          public static TLSA parse(DataInputStream dis,
                                   int length)
                            throws IOException

      Throws:
        `IOException`

    - #### serialize

          public void serialize(DataOutputStream dos)
                         throws IOException

      Description copied from class: `Data`
      The internal method used to serialize Data subclasses.
      Specified by:
        `serialize` in class `Data`
      Parameters:
        `dos` - the output stream to serialize to.
      Throws:
        `IOException` - if an I/O error occurs.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`