"Fossies" - the Fresh Open Source Software Archive

Member "openssl-1.1.1b/crypto/err/README" (26 Feb 2019, 1396 Bytes) of package /linux/misc/openssl-1.1.1b.tar.gz:

As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 Adding new libraries
    2 --------------------
    4 When 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
    6 name 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:
   10     L      XXX     xxx.h   xxx_err.c
   12 to crypto/err/openssl.ec, and add xxx_err.c to the Makefile.
   13 Running make errors will then generate a file xxx_err.c, and
   14 add all error codes used in the library to xxx.h.
   16 Additionally the library include file must have a certain form.
   17 Typically it will initially look like this:
   19     #ifndef HEADER_XXX_H
   20     #define HEADER_XXX_H
   22     #ifdef __cplusplus
   23     extern "C" {
   24     #endif
   26     /* Include files */
   28     #include <openssl/bio.h>
   29     #include <openssl/x509.h>
   31     /* Macros, structures and function prototypes */
   34     /* BEGIN ERROR CODES */
   36 The BEGIN ERROR CODES sequence is used by the error code
   37 generation script as the point to place new error codes, any text
   38 after this point will be overwritten when make errors is run.
   39 The closing #endif etc will be automatically added by the script.
   41 The generated C error code file xxx_err.c will load the header
   42 files stdio.h, openssl/err.h and openssl/xxx.h so the
   43 header file must load any additional header files containing any
   44 definitions it uses.