xref: /openbsd/lib/libcrypto/man/ERR_put_error.3 (revision fc61954a)
1.Dd $Mdocdate: November 2 2016 $
2.Dt ERR_PUT_ERROR 3
3.Os
4.Sh NAME
5.Nm ERR_put_error ,
6.Nm ERR_add_error_data
7.Nd record an OpenSSL error
8.Sh SYNOPSIS
9.In openssl/err.h
10.Ft void
11.Fo ERR_put_error
12.Fa "int lib"
13.Fa "int func"
14.Fa "int reason"
15.Fa "const char *file"
16.Fa "int line"
17.Fc
18.Ft void
19.Fo ERR_add_error_data
20.Fa "int num"
21.Fa ...
22.Fc
23.Sh DESCRIPTION
24.Fn ERR_put_error
25adds an error code to the thread's error queue.
26It signals that the error of reason code
27.Fa reason
28occurred in function
29.Fa func
30of library
31.Fa lib ,
32in line number
33.Fa line
34of
35.Fa file .
36This function is usually called by a macro.
37.Pp
38.Fn ERR_add_error_data
39associates the concatenation of its
40.Fa num
41string arguments with the error code added last.
42.Pp
43.Xr ERR_load_strings 3
44can be used to register error strings so that the application can a
45generate human-readable error messages for the error code.
46.Sh RETURN VALUES
47.Fn ERR_put_error
48and
49.Fn ERR_add_error_data
50return no values.
51.Sh SEE ALSO
52.Xr ERR 3 ,
53.Xr ERR_load_strings 3
54.Sh HISTORY
55.Fn ERR_put_error
56is available in all versions of SSLeay and OpenSSL.
57.Fn ERR_add_error_data
58was added in SSLeay 0.9.0.
59