package x509

  1. Overview
  2. Docs

X.500 distinguished name

type _ k =
  1. | CN : string k
  2. | Serialnumber : string k
  3. | C : string k
  4. | L : string k
  5. | SP : string k
  6. | O : string k
  7. | OU : string k
  8. | T : string k
  9. | DNQ : string k
  10. | Mail : string k
  11. | DC : string k
  12. | Given_name : string k
  13. | Surname : string k
  14. | Initials : string k
  15. | Pseudonym : string k
  16. | Generation : string k
  17. | Other : Asn.oid -> string k

The polymorphic variant of a distinguished name component, as defined in X.500.

A distinguished name is a list of component.

include Gmap.S with type 'a key = 'a k
type !'a key = 'a k
type t
val empty : t
val singleton : 'a key -> 'a -> t
val is_empty : t -> bool
val cardinal : t -> int
val mem : 'a key -> t -> bool
val find : 'a key -> t -> 'a option
val get : 'a key -> t -> 'a
val add_unless_bound : 'a key -> 'a -> t -> t option
val add : 'a key -> 'a -> t -> t
val remove : 'a key -> t -> t
val update : 'a key -> ('a option -> 'a option) -> t -> t
type b =
  1. | B : 'a key * 'a -> b
val min_binding : t -> b option
val max_binding : t -> b option
val any_binding : t -> b option
val bindings : t -> b list
type eq = {
  1. f : 'a. 'a key -> 'a -> 'a -> bool;
}
type mapper = {
  1. f : 'a. 'a key -> 'a -> 'a;
}
val map : mapper -> t -> t
val iter : (b -> unit) -> t -> unit
val fold : (b -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (b -> bool) -> t -> bool
val exists : (b -> bool) -> t -> bool
val filter : (b -> bool) -> t -> t
type merger = {
  1. f : 'a. 'a key -> 'a option -> 'a option -> 'a option;
}
val merge : merger -> t -> t -> t
type unionee = {
  1. f : 'a. 'a key -> 'a -> 'a -> 'a option;
}
val union : unionee -> t -> t -> t
val equal : t -> t -> bool

equal a b is true if the distinguished names a and b are equal.

val pp : t Fmt.t

pp ppf dn pretty-prints the distinguished name.

val decode_der : Cstruct.t -> (t, [> Rresult.R.msg ]) Rresult.result

decode_der cs is dn, the ASN.1 decoded distinguished name of cs.

val encode_der : t -> Cstruct.t

encode_der dn is cstruct, the ASN.1 encoded representation of the distinguished name dn.

OCaml

Innovation. Community. Security.