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