1*4724848cSchristos=pod 2*4724848cSchristos 3*4724848cSchristos=head1 NAME 4*4724848cSchristos 5*4724848cSchristosERR_load_strings, ERR_PACK, ERR_get_next_error_library - load 6*4724848cSchristosarbitrary error strings 7*4724848cSchristos 8*4724848cSchristos=head1 SYNOPSIS 9*4724848cSchristos 10*4724848cSchristos #include <openssl/err.h> 11*4724848cSchristos 12*4724848cSchristos int ERR_load_strings(int lib, ERR_STRING_DATA *str); 13*4724848cSchristos 14*4724848cSchristos int ERR_get_next_error_library(void); 15*4724848cSchristos 16*4724848cSchristos unsigned long ERR_PACK(int lib, int func, int reason); 17*4724848cSchristos 18*4724848cSchristos=head1 DESCRIPTION 19*4724848cSchristos 20*4724848cSchristosERR_load_strings() registers error strings for library number B<lib>. 21*4724848cSchristos 22*4724848cSchristosB<str> is an array of error string data: 23*4724848cSchristos 24*4724848cSchristos typedef struct ERR_string_data_st 25*4724848cSchristos { 26*4724848cSchristos unsigned long error; 27*4724848cSchristos char *string; 28*4724848cSchristos } ERR_STRING_DATA; 29*4724848cSchristos 30*4724848cSchristosThe error code is generated from the library number and a function and 31*4724848cSchristosreason code: B<error> = ERR_PACK(B<lib>, B<func>, B<reason>). 32*4724848cSchristosERR_PACK() is a macro. 33*4724848cSchristos 34*4724848cSchristosThe last entry in the array is {0,0}. 35*4724848cSchristos 36*4724848cSchristosERR_get_next_error_library() can be used to assign library numbers 37*4724848cSchristosto user libraries at runtime. 38*4724848cSchristos 39*4724848cSchristos=head1 RETURN VALUES 40*4724848cSchristos 41*4724848cSchristosERR_load_strings() returns 1 for success and 0 for failure. ERR_PACK() returns the error code. 42*4724848cSchristosERR_get_next_error_library() returns zero on failure, otherwise a new 43*4724848cSchristoslibrary number. 44*4724848cSchristos 45*4724848cSchristos=head1 SEE ALSO 46*4724848cSchristos 47*4724848cSchristosL<ERR_load_strings(3)> 48*4724848cSchristos 49*4724848cSchristos=head1 COPYRIGHT 50*4724848cSchristos 51*4724848cSchristosCopyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. 52*4724848cSchristos 53*4724848cSchristosLicensed under the OpenSSL license (the "License"). You may not use 54*4724848cSchristosthis file except in compliance with the License. You can obtain a copy 55*4724848cSchristosin the file LICENSE in the source distribution or at 56*4724848cSchristosL<https://www.openssl.org/source/license.html>. 57*4724848cSchristos 58*4724848cSchristos=cut 59