Name Date Size #Lines LOC

..20-Jun-2024-

README.mdH A D19-Jun-20241.8 KiB5639

build.infoH A D19-Jun-2024133 43

err.cH A D19-Jun-202424.8 KiB899667

err_all.cH A D19-Jun-20243.4 KiB116103

err_all_legacy.cH A D17-Jun-20212.9 KiB10792

err_blocks.cH A D02-Jun-20213 KiB11871

err_local.hH A D19-Jun-20243.2 KiB10077

err_mark.cH A D19-Jun-20242 KiB10272

err_prn.cH A D02-Jun-20215.7 KiB187152

err_save.cH A D19-Jun-20244.4 KiB157106

openssl.ecH A D19-Jun-20246.4 KiB8279

openssl.txtH A D21-Jun-202492.8 KiB1,8471,845

README.md

1Adding new libraries
2====================
3
4When adding a new sub-library to OpenSSL, assign it a library number
5`ERR_LIB_XXX`, define a macro `XXXerr()` (both in `err.h`), add its
6name to `ERR_str_libraries[]` (in `crypto/err/err.c`), and add
7`ERR_load_XXX_strings()` to the `ERR_load_crypto_strings()` function
8(in `crypto/err/err_all.c`). Finally, add an entry:
9
10    L      XXX     xxx.h   xxx_err.c
11
12to `crypto/err/openssl.ec`, and add `xxx_err.c` to the `Makefile`.
13Running make errors will then generate a file `xxx_err.c`, and
14add all error codes used in the library to `xxx.h`.
15
16Additionally the library include file must have a certain form.
17Typically it will initially look like this:
18
19    #ifndef HEADER_XXX_H
20    #define HEADER_XXX_H
21
22    #ifdef __cplusplus
23    extern "C" {
24    #endif
25
26    /* Include files */
27
28    #include <openssl/bio.h>
29    #include <openssl/x509.h>
30
31    /* Macros, structures and function prototypes */
32
33
34    /* BEGIN ERROR CODES */
35
36The `BEGIN ERROR CODES` sequence is used by the error code
37generation script as the point to place new error codes, any text
38after this point will be overwritten when make errors is run.
39The closing `#endif` etc will be automatically added by the script.
40
41The generated C error code file `xxx_err.c` will load the header
42files `stdio.h`, `openssl/err.h` and `openssl/xxx.h` so the
43header file must load any additional header files containing any
44definitions it uses.
45
46Adding new error codes
47======================
48
49Instead of manually adding error codes into `crypto/err/openssl.txt`,
50it is recommended to leverage `make update` for error code generation.
51The target will process relevant sources and generate error codes for
52any *used* error codes.
53
54If an error code is added manually into `crypto/err/openssl.txt`,
55subsequent `make update` has no effect.
56