1ERR_ERROR_STRING(3ossl)             OpenSSL            ERR_ERROR_STRING(3ossl)
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_reason_error_string(unsigned long e);
18
19       Deprecated in OpenSSL 3.0:
20
21        const char *ERR_func_error_string(unsigned long e);
22

DESCRIPTION

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

RETURN VALUES

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

SEE ALSO

60       ERR_get_error(3), ERR_print_errors(3)
61

HISTORY

63       ERR_func_error_string() became deprecated in OpenSSL 3.0.
64
66       Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
67
68       Licensed under the Apache License 2.0 (the "License").  You may not use
69       this file except in compliance with the License.  You can obtain a copy
70       in the file LICENSE in the source distribution or at
71       <https://www.openssl.org/source/license.html>.
72
73
74
753.1.1                             2023-08-31           ERR_ERROR_STRING(3ossl)
Impressum