package activitypub

  1. Overview
  2. Docs

Implementation of HTTP signatures.

type E.error +=
  1. | Signing_error of string
type signature_spec = {
  1. algorithm : string;
  2. key_id : string;
  3. signed_headers : string list;
  4. signature : string;
  5. created : int option;
  6. expires : int option;
}
val string_of_signature_spec : signature_spec -> string
val verify_request : ?map_key_id: (string -> (X509.Public_key.t, [ `Msg of string ]) Stdlib.result Lwt.t) -> Cohttp.Request.t -> string -> bool option Lwt.t
val add_signature_header : Cohttp.Code.meth -> Iri.t -> Cohttp.Header.t -> (signature_spec * (string -> string)) -> string -> Cohttp.Header.t
val rsa256_signing : ?signed_headers:string list -> X509.Public_key.t -> X509.Private_key.t -> signature_spec * (string -> string)
val rsa256_signing_with_actor : ?signed_headers:string list -> Iri.t -> X509.Private_key.t -> signature_spec * (string -> string)
OCaml

Innovation. Community. Security.