| Copyright | (c) Viktor Dukhovni 2026 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | ietf-dane@dukhovni.org |
| Stability | unstable |
| Safe Haskell | None |
| Language | GHC2024 |
Net.DNSBase.RData.TLSA
Description
Four DANE-style records that publish cryptographic identifiers
via DNS. T_tlsa (RFC 6698) carries TLS certificate
associations; T_smimea (RFC 8162) carries the same for
S/MIME — both share the wire format of the underlying X_tlsa
representation. T_sshfp (RFC 4255) carries SSH host-key
fingerprints. T_openpgpkey (RFC 7929) carries an OpenPGP
transferable public key.
Synopsis
- data X_tlsa (n :: Nat) where
- type family XtlsaConName (n :: Nat) :: Symbol where ...
- type T_tlsa = X_tlsa N_tlsa
- type T_smimea = X_tlsa N_smimea
- tlsaUsage :: T_tlsa -> Word8
- tlsaSelector :: T_tlsa -> Word8
- tlsaMtype :: T_tlsa -> Word8
- tlsaAssocData :: T_tlsa -> ShortByteString
- smimeaUsage :: T_smimea -> Word8
- smimeaSelector :: T_smimea -> Word8
- smimeaMtype :: T_smimea -> Word8
- smimeaAssocData :: T_smimea -> ShortByteString
- data T_sshfp = T_SSHFP {}
- data T_openpgpkey = T_OPENPGPKEY {}
TLSA and SMIMEA
data X_tlsa (n :: Nat) Source #
Shared wire-format representation for DANE certificate-binding
records: the TLSA record
(RFC 6698 section 2.1,
DANE for TLS) and the SMIMEA record
(RFC 8162 section 2,
DANE for S/MIME). The type parameter n (either N_tlsa or
N_smimea) determines the RR type. Each has its own type synonym
(T_tlsa, T_smimea) and matching record pattern synonym
(T_TLSA, T_SMIMEA) with the corresponding field-name prefix
(tlsa, smimea). The role of X_tlsa is nominal: the wire
format is shared but the two RR types bind to different protocols,
so T_tlsa and T_smimea are not coercible.
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Cert. Usage | Selector | Matching Type | / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / / / / Certificate Association Data / / / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
If a received message carries a payload shorter than 3 bytes the record is returned as an opaque RData of the corresponding RRTYPE with the truncated bytes as its value; DANE validators should treat such records as present but "unusable".
Derived Ord is canonical
(RFC 4034 section 6.2).
See T_sshfp for the SSH host-key fingerprint record and
T_openpgpkey for the OpenPGP key record — both also live in
this module.
Constructors
| X_TLSA | |
Fields
| |
Bundled Patterns
| pattern T_TLSA | Record pattern synonym viewing the shared |
Fields
| |
| pattern T_SMIMEA | Record pattern synonym viewing the shared |
Fields
| |
Instances
type family XtlsaConName (n :: Nat) :: Symbol where ... Source #
Equations
| XtlsaConName N_tlsa = "T_TLSA" | |
| XtlsaConName N_smimea = "T_SMIMEA" | |
| XtlsaConName n = TypeError ('ShowType n ':<>: 'Text " is not a TLSA or SMIMEA RRTYPE") :: Symbol |
T_TLSA fields
tlsaSelector :: T_tlsa -> Word8 Source #
T_SMIMEA fields
smimeaUsage :: T_smimea -> Word8 Source #
smimeaSelector :: T_smimea -> Word8 Source #
smimeaMtype :: T_smimea -> Word8 Source #
SSHFP
The SSHFP resource record
(RFC 4255 section 3.1)
— a fingerprint of an SSH host public key. Three fields: an
8-bit algorithm tag (matches the SSH key algorithm), an 8-bit
fingerprint type tag (SHA-1, SHA-256, ...), and the
fingerprint bytes.
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | algorithm | fp type | / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / / / / fingerprint / / / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
See X_tlsa / T_openpgpkey for the other DANE-style records
in this module.
Constructors
| T_SSHFP | |
Fields | |
Instances
| Presentable T_sshfp Source # | |||||
Defined in Net.DNSBase.RData.TLSA Methods present :: T_sshfp -> Builder -> Builder Source # presentLazy :: T_sshfp -> ByteString -> ByteString Source # | |||||
| KnownRData T_sshfp Source # | |||||
Defined in Net.DNSBase.RData.TLSA Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_sshfp => RDataExtensionVal T_sshfp Source # rdType :: forall b -> b ~ T_sshfp => RRTYPE Source # rdTypePres :: forall b -> b ~ T_sshfp => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_sshfp => RDataExtensionVal T_sshfp -> Int -> SGet RData Source # | |||||
| Show T_sshfp Source # | |||||
| Eq T_sshfp Source # | |||||
| Ord T_sshfp Source # | |||||
Defined in Net.DNSBase.RData.TLSA | |||||
| type RDataExtensionVal T_sshfp Source # | |||||
Defined in Net.DNSBase.RData.TLSA | |||||
OPENPGPKEY
data T_openpgpkey Source #
The OPENPGPKEY resource record
(RFC 7929 section 2.2)
— an OpenPGP transferable public key, carried as raw bytes (no
ASCII armor, no base64). Single-field; presented in
base64 form.
See X_tlsa / T_sshfp for the other DANE-style records in
this module.
Constructors
| T_OPENPGPKEY | |
Fields | |
Instances
| Presentable T_openpgpkey Source # | |||||
Defined in Net.DNSBase.RData.TLSA Methods present :: T_openpgpkey -> Builder -> Builder Source # presentLazy :: T_openpgpkey -> ByteString -> ByteString Source # | |||||
| KnownRData T_openpgpkey Source # | |||||
Defined in Net.DNSBase.RData.TLSA Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_openpgpkey => RDataExtensionVal T_openpgpkey Source # rdType :: forall b -> b ~ T_openpgpkey => RRTYPE Source # rdTypePres :: forall b -> b ~ T_openpgpkey => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_openpgpkey => RDataExtensionVal T_openpgpkey -> Int -> SGet RData Source # | |||||
| Show T_openpgpkey Source # | |||||
Defined in Net.DNSBase.RData.TLSA Methods showsPrec :: Int -> T_openpgpkey -> ShowS # show :: T_openpgpkey -> String # showList :: [T_openpgpkey] -> ShowS # | |||||
| Eq T_openpgpkey Source # | |||||
Defined in Net.DNSBase.RData.TLSA | |||||
| Ord T_openpgpkey Source # | |||||
Defined in Net.DNSBase.RData.TLSA Methods compare :: T_openpgpkey -> T_openpgpkey -> Ordering # (<) :: T_openpgpkey -> T_openpgpkey -> Bool # (<=) :: T_openpgpkey -> T_openpgpkey -> Bool # (>) :: T_openpgpkey -> T_openpgpkey -> Bool # (>=) :: T_openpgpkey -> T_openpgpkey -> Bool # max :: T_openpgpkey -> T_openpgpkey -> T_openpgpkey # min :: T_openpgpkey -> T_openpgpkey -> T_openpgpkey # | |||||
| type RDataExtensionVal T_openpgpkey Source # | |||||
Defined in Net.DNSBase.RData.TLSA | |||||