Module X509.Key_type

Types of keys

type t = [
| `RSA
| `ED25519
| `P224
| `P256
| `P384
| `P521
]

The polymorphic variant of key types.

val strings : (string * t) list

strings is an associative list of string and key_type pairs. Useful for cmdliner (Arg.enum).

val to_string : t -> string

to_string kt is a string representation of kt.

val of_string : string -> ( t, [> `Msg of string ] ) Stdlib.result

of_string s is Ok key_type if the string could be decoded as key_type, or an Error _.

val pp : t Fmt.t

pp ppf t is a pretty printer of t on ppf.

type signature_scheme = [
| `RSA_PSS
| `RSA_PKCS1
| `ECDSA
| `ED25519
]

The type of signature schemes.

val pp_signature_scheme : signature_scheme Fmt.t

pp_signature_scheme ppf s is a pretty-printer of s on ppf.

val supports_signature_scheme : t -> signature_scheme -> bool

supports_scheme key_type scheme is true if the signature scheme is supported with key type.