package ssl

  1. Overview
  2. Docs
Bindings for OpenSSL

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.8.0.tar.gz
md5=a1617d39ce93b98bca554a4c5b3340ae
sha512=8178e51ab94aaaa1ed2438e8edac876db35fdf046be52e5d2237e1f8c27fe3483e2442f147de8ef0491be7673430d52e3349ad4070060ba5699efeb39b47fbea

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.