package dns

  1. Overview
  2. Docs

Signature operations and their errors.

type e = [
  1. | `Bad_key of [ `raw ] Domain_name.t * Tsig.t
  2. | `Bad_timestamp of [ `raw ] Domain_name.t * Tsig.t * Dnskey.t
  3. | `Bad_truncation of [ `raw ] Domain_name.t * Tsig.t
  4. | `Invalid_mac of [ `raw ] Domain_name.t * Tsig.t
]

The type of a verification error.

val pp_e : e Fmt.t

pp_e ppf e pretty-prints the verification error e on ppf.

type verify = ?mac:string -> Ptime.t -> Packet.t -> [ `raw ] Domain_name.t -> ?key:Dnskey.t -> Tsig.t -> string -> (Tsig.t * string * Dnskey.t, e * string option) result

The type of a verification function. The mac contains data for a reply to a signed request.

val no_verify : verify

no_verify always returns an error.

type sign = ?mac:string -> ?max_size:int -> [ `raw ] Domain_name.t -> Tsig.t -> key:Dnskey.t -> Packet.t -> string -> (string * string) option

The type of a signature function. The mac contains data for a reply to a signed request.

val no_sign : sign

no_sign always returns None.

OCaml

Innovation. Community. Security.