]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/ERR_GET_LIB.pod
Remove an unnecessary call to BN_CTX_free.
[thirdparty/openssl.git] / doc / man3 / ERR_GET_LIB.pod
CommitLineData
388f2f56
UM
1=pod
2
3=head1 NAME
4
3dfda1a6
RS
5ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON, ERR_FATAL_ERROR
6- get information from error codes
388f2f56
UM
7
8=head1 SYNOPSIS
9
10 #include <openssl/err.h>
11
12 int ERR_GET_LIB(unsigned long e);
13
14 int ERR_GET_FUNC(unsigned long e);
15
16 int ERR_GET_REASON(unsigned long e);
17
036ba500
BK
18 int ERR_FATAL_ERROR(unsigned long e);
19
388f2f56
UM
20=head1 DESCRIPTION
21
22The error code returned by ERR_get_error() consists of a library
23number, function code and reason code. ERR_GET_LIB(), ERR_GET_FUNC()
24and ERR_GET_REASON() can be used to extract these.
25
036ba500
BK
26ERR_FATAL_ERROR() indicates whether a given error code is a fatal error.
27
388f2f56
UM
28The library number and function code describe where the error
29occurred, the reason code is the information about what went wrong.
30
31Each sub-library of OpenSSL has a unique library number; function and
32reason codes are unique within each sub-library. Note that different
33libraries may use the same value to signal different functions and
34reasons.
35
36B<ERR_R_...> reason codes such as B<ERR_R_MALLOC_FAILURE> are globally
37unique. However, when checking for sub-library specific reason codes,
38be sure to also compare the library number.
39
036ba500 40ERR_GET_LIB(), ERR_GET_FUNC(), ERR_GET_REASON(), and ERR_FATAL_ERROR()
aac96e27 41are macros.
388f2f56
UM
42
43=head1 RETURN VALUES
44
036ba500
BK
45The library number, function code, reason code, and whether the error
46is fatal, respectively.
aac96e27 47Starting with OpenSSL 3.0.0, the function code is always set to zero.
388f2f56
UM
48
49=head1 SEE ALSO
50
73fb82b7 51L<ERR_get_error(3)>
388f2f56
UM
52
53=head1 HISTORY
54
55ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are available in
a528d4f0 56all versions of OpenSSL.
388f2f56 57
e2f92610
RS
58=head1 COPYRIGHT
59
73fb82b7 60Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 61
4746f25a 62Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
63this file except in compliance with the License. You can obtain a copy
64in the file LICENSE in the source distribution or at
65L<https://www.openssl.org/source/license.html>.
66
67=cut