summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/ERR.357
1 files changed, 3 insertions, 54 deletions
diff --git a/src/lib/libcrypto/man/ERR.3 b/src/lib/libcrypto/man/ERR.3
index b1be67a037..e6b1031a14 100644
--- a/src/lib/libcrypto/man/ERR.3
+++ b/src/lib/libcrypto/man/ERR.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ERR.3,v 1.9 2022/07/12 14:42:49 kn Exp $ 1.\" $OpenBSD: ERR.3,v 1.10 2022/09/06 10:22:31 kn Exp $
2.\" OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700 2.\" OpenSSL 186bb907 Apr 13 11:05:13 2015 -0700
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org> and 4.\" This file was written by Ulf Moeller <ulf@openssl.org> and
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: July 12 2022 $ 52.Dd $Mdocdate: September 6 2022 $
53.Dt ERR 3 53.Dt ERR 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -113,61 +113,10 @@ to the
113.Fn ERR_load_crypto_strings 113.Fn ERR_load_crypto_strings
114function (in 114function (in
115.Sy /usr/src/lib/libcrypto/err/err_all.c ) . 115.Sy /usr/src/lib/libcrypto/err/err_all.c ) .
116Finally, add an entry 116Finally, add
117.Pp
118.Dl L XXX xxx.h xxx_err.c
119.Pp
120to
121.Sy /usr/src/lib/libcrypto/err/openssl.ec ,
122and add
123.Pa xxx_err.c 117.Pa xxx_err.c
124to the 118to the
125.Pa Makefile . 119.Pa Makefile .
126Running
127.Sy make errors
128will then generate a file
129.Pa xxx_err.c ,
130and add all error codes used in the library to
131.Pa xxx.h .
132.Pp
133Additionally the library include file must have a certain form.
134Typically it will initially look like this:
135.Bd -literal -offset indent
136#ifndef HEADER_XXX_H
137#define HEADER_XXX_H
138
139#ifdef __cplusplus
140extern "C" {
141#endif
142
143/* Include files */
144
145#include <openssl/bio.h>
146#include <openssl/x509.h>
147
148/* Macros, structures and function prototypes */
149
150/* BEGIN ERROR CODES */
151.Ed
152.Pp
153The
154.Sy BEGIN ERROR CODES
155sequence is used by the error code generation script as the point to
156place new error codes.
157Any text after this point will be overwritten when
158.Sy make errors
159is run.
160The closing #endif etc. will be automatically added by the script.
161.Pp
162The generated C error code file
163.Pa xxx_err.c
164will load the header files
165.In stdio.h ,
166.In openssl/err.h
167and
168.In openssl/xxx.h
169so the header file must load any additional header files containing any
170definitions it uses.
171.Sh USING ERROR CODES IN EXTERNAL LIBRARIES 120.Sh USING ERROR CODES IN EXTERNAL LIBRARIES
172It is also possible to use OpenSSL's error code scheme in external 121It is also possible to use OpenSSL's error code scheme in external
173libraries. 122libraries.