Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
X.500 distinguished name
type attribute =
| CN of string
| Serialnumber of string
| C of string
| L of string
| ST of string
| O of string
| OU of string
| T of string
| DNQ of string
| Mail of string
| DC of string
| Given_name of string
| Surname of string
| Initials of string
| Pseudonym of string
| Generation of string
| Street of string
| Userid of string
| Other of Asn.oid * string
The variant of a relative distinguished name component, as defined in X.500: an attribute type and value.
Relative_distinguished_name is a set of attributes.
A distinguished name is a list of relative distinguished names, starting with the most significant component.
val make_pp :
format:[ `RFC4514 | `OpenSSL | `OSF ] ->
?spacing:[ `Tight | `Medium | `Loose ] ->
unit ->
t Fmt.t
make_pp ()
creates a customized pretty-printer for t
.
pp ppf dn
pretty-prints the distinguished name. This is currently Fmt.hbox (make_pp ~format:`OSF ())
. If your application relies on the precise format, it is advicable to create a custom formatter with make_pp
to guard against future changes to the default format.
val common_name : t -> string option
common_name t
is Some x
if the distinguished name t
contains a CN x
, None
otherwise.
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
.