package ssl

  1. Overview
  2. Docs
Bindings for OpenSSL

Install

Dune Dependency

Authors

Maintainers

Sources

v0.7.0.tar.gz
md5=0ced13c2beef2135cd9d3a3743ea0e37
sha512=969c4d64828449a49bdef26ca5f8faa72d2fe2a2304ccbf589a3ff097c2bf8ae9eb83ae1c90216f6b4d6f359e462ea47e0106a7386e26848d14910138fcb07f8

doc/ssl/Ssl/Error/index.html

Module Ssl.ErrorSource

Sourcetype t = private {
  1. library_number : int;
    (*

    Identifies the OpenSSL sub-library that generated this error. Library values are defined in https://github.com/openssl/openssl/blob/openssl-3.0.0/include/openssl/err.h.in#L72

    *)
  2. reason_code : int;
    (*

    The reason code is the information about what went wrong.

    *)
  3. lib : string option;
    (*

    The library name that generated the error.

    *)
  4. reason : string option;
    (*

    The reason string for the error message.

    *)
}

The error code returned by ERR_get_error() consists of a library number, function code and reason code.

Each sub-library of OpenSSL has a unique library number; function and reason codes are unique within each sub-library. Note that different libraries may use the same value to signal different functions and reasons.

Sourceval get_error : unit -> t

Retrieve the earliest error from the error queue then it removes the entry. Returns the code and library and reason strings

Sourceval peek_error : unit -> t

Retrieve the earliest error from the error queue without modifying it. Returns the code and library and reason strings

Sourceval peek_last_error : unit -> t

Retrieves the latest error code from the thread's error queue without modifying it. Returns the code and library and reason strings.

OCaml

Innovation. Community. Security.