1ERR_ERROR_STRING(3)                 OpenSSL                ERR_ERROR_STRING(3)
2
3
4

NAME

6       ERR_error_string, ERR_error_string_n, ERR_lib_error_string,
7       ERR_func_error_string, ERR_reason_error_string - obtain human-readable
8       error message
9

SYNOPSIS

11        #include <openssl/err.h>
12
13        char *ERR_error_string(unsigned long e, char *buf);
14        void ERR_error_string_n(unsigned long e, char *buf, size_t len);
15
16        const char *ERR_lib_error_string(unsigned long e);
17        const char *ERR_func_error_string(unsigned long e);
18        const char *ERR_reason_error_string(unsigned long e);
19

DESCRIPTION

21       ERR_error_string() generates a human-readable string representing the
22       error code e, and places it at buf. buf must be at least 256 bytes
23       long. If buf is NULL, the error string is placed in a static buffer.
24       Note that this function is not thread-safe and does no checks on the
25       size of the buffer; use ERR_error_string_n() instead.
26
27       ERR_error_string_n() is a variant of ERR_error_string() that writes at
28       most len characters (including the terminating 0) and truncates the
29       string if necessary.  For ERR_error_string_n(), buf may not be NULL.
30
31       The string will have the following format:
32
33        error:[error code]:[library name]:[function name]:[reason string]
34
35       error code is an 8 digit hexadecimal number, library name, function
36       name and reason string are ASCII text.
37
38       ERR_lib_error_string(), ERR_func_error_string() and
39       ERR_reason_error_string() return the library name, function name and
40       reason string respectively.
41
42       If there is no text string registered for the given error code, the
43       error string will contain the numeric code.
44
45       ERR_print_errors(3) can be used to print all error codes currently in
46       the queue.
47

RETURN VALUES

49       ERR_error_string() returns a pointer to a static buffer containing the
50       string if buf == NULL, buf otherwise.
51
52       ERR_lib_error_string(), ERR_func_error_string() and
53       ERR_reason_error_string() return the strings, and NULL if none is
54       registered for the error code.
55

SEE ALSO

57       ERR_get_error(3), ERR_print_errors(3)
58
60       Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
61
62       Licensed under the OpenSSL license (the "License").  You may not use
63       this file except in compliance with the License.  You can obtain a copy
64       in the file LICENSE in the source distribution or at
65       <https://www.openssl.org/source/license.html>.
66
67
68
691.1.1k                            2021-03-26               ERR_ERROR_STRING(3)
Impressum