package dns

  1. Overview
  2. Docs

Secure shell fingerprint

The secure shell (SSH) applies trust on first use, and can store fingerprints as SSHFP records in DNS, which is then used as a second channel.

type algorithm =
  1. | Rsa
  2. | Dsa
  3. | Ecdsa
  4. | Ed25519
    (*

    The type of supported algorithms.

    *)
val algorithm_to_int : algorithm -> int

algorithm_to_int a is the 8 bit integer representation of algorithm a.

val int_to_algorithm : ?off:int -> int -> (algorithm, [> `Not_implemented of int * string ]) Stdlib.result

int_to_algorithm ~off i is the algorithm constructor of i, if defined. Otherwise an Error is returned.

val pp_algorithm : algorithm Fmt.t

pp_algorithm ppf a pretty-prints the algorithm a on ppf.

type typ =
  1. | SHA1
  2. | SHA256
    (*

    The type of supported SSH fingerprint types.

    *)
val typ_to_int : typ -> int

typ_to_int t is the 8 bit integer representation of typ t.

val int_to_typ : ?off:int -> int -> (typ, [> `Not_implemented of int * string ]) Stdlib.result

int_to_typ ~off i is the typ constructor of i, if defined. Otherwise an Error is returned.

val pp_typ : typ Fmt.t

pp_typ ppf t pretty-prints the typ t on ppf.

type t = {
  1. algorithm : algorithm;
  2. typ : typ;
  3. fingerprint : Cstruct.t;
}

The type of a SSH fingerprint record, consisting of algorithm, typ, and actual fingerprint.

val pp : t Fmt.t

pp ppf t pretty-prints the SSH fingerprint record t on ppf.

val compare : t -> t -> int

compare a b compares the SSH fingerprint record a with b by comparing the individual fields in order.

OCaml

Innovation. Community. Security.