diff options
| author | schwarze <> | 2016-11-02 15:23:41 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-11-02 15:23:41 +0000 |
| commit | e555e2e6cc68ff074abb5f707eeb2bde15f9e8f0 (patch) | |
| tree | d746bbb5cfe6d085f48965873fc3db01fe55f4d6 /src/lib/libcrypto/doc | |
| parent | c5ef581eab94ca8726254ac45c1577ecde5adcac (diff) | |
| download | openbsd-e555e2e6cc68ff074abb5f707eeb2bde15f9e8f0.tar.gz openbsd-e555e2e6cc68ff074abb5f707eeb2bde15f9e8f0.tar.bz2 openbsd-e555e2e6cc68ff074abb5f707eeb2bde15f9e8f0.zip | |
convert ERR manuals from pod to mdoc; while reading this,
i wtfed, laughed, puked, and cried in more or less that order...
Diffstat (limited to 'src/lib/libcrypto/doc')
| -rw-r--r-- | src/lib/libcrypto/doc/ERR.pod | 185 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_GET_LIB.pod | 51 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_clear_error.pod | 29 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_error_string.pod | 73 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_get_error.pod | 79 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_load_crypto_strings.pod | 46 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_load_strings.pod | 54 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_print_errors.pod | 51 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_put_error.pod | 44 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_remove_state.pod | 45 | ||||
| -rw-r--r-- | src/lib/libcrypto/doc/ERR_set_mark.pod | 38 |
11 files changed, 0 insertions, 695 deletions
diff --git a/src/lib/libcrypto/doc/ERR.pod b/src/lib/libcrypto/doc/ERR.pod deleted file mode 100644 index 343a9b84c2..0000000000 --- a/src/lib/libcrypto/doc/ERR.pod +++ /dev/null | |||
| @@ -1,185 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR - error codes | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/err.h> | ||
| 10 | |||
| 11 | unsigned long ERR_get_error(void); | ||
| 12 | unsigned long ERR_peek_error(void); | ||
| 13 | unsigned long ERR_get_error_line(const char **file, int *line); | ||
| 14 | unsigned long ERR_peek_error_line(const char **file, int *line); | ||
| 15 | unsigned long ERR_get_error_line_data(const char **file, int *line, | ||
| 16 | const char **data, int *flags); | ||
| 17 | unsigned long ERR_peek_error_line_data(const char **file, int *line, | ||
| 18 | const char **data, int *flags); | ||
| 19 | |||
| 20 | int ERR_GET_LIB(unsigned long e); | ||
| 21 | int ERR_GET_FUNC(unsigned long e); | ||
| 22 | int ERR_GET_REASON(unsigned long e); | ||
| 23 | |||
| 24 | void ERR_clear_error(void); | ||
| 25 | |||
| 26 | char *ERR_error_string(unsigned long e, char *buf); | ||
| 27 | const char *ERR_lib_error_string(unsigned long e); | ||
| 28 | const char *ERR_func_error_string(unsigned long e); | ||
| 29 | const char *ERR_reason_error_string(unsigned long e); | ||
| 30 | |||
| 31 | void ERR_print_errors(BIO *bp); | ||
| 32 | void ERR_print_errors_fp(FILE *fp); | ||
| 33 | |||
| 34 | void ERR_load_crypto_strings(void); | ||
| 35 | void ERR_free_strings(void); | ||
| 36 | |||
| 37 | void ERR_remove_state(unsigned long pid); | ||
| 38 | |||
| 39 | void ERR_put_error(int lib, int func, int reason, const char *file, | ||
| 40 | int line); | ||
| 41 | void ERR_add_error_data(int num, ...); | ||
| 42 | |||
| 43 | void ERR_load_strings(int lib,ERR_STRING_DATA str[]); | ||
| 44 | unsigned long ERR_PACK(int lib, int func, int reason); | ||
| 45 | int ERR_get_next_error_library(void); | ||
| 46 | |||
| 47 | =head1 DESCRIPTION | ||
| 48 | |||
| 49 | When a call to the OpenSSL library fails, this is usually signalled | ||
| 50 | by the return value, and an error code is stored in an error queue | ||
| 51 | associated with the current thread. The B<err> library provides | ||
| 52 | functions to obtain these error codes and textual error messages. | ||
| 53 | |||
| 54 | The L<ERR_get_error(3)|ERR_get_error(3)> manpage describes how to | ||
| 55 | access error codes. | ||
| 56 | |||
| 57 | Error codes contain information about where the error occurred, and | ||
| 58 | what went wrong. L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> describes how to | ||
| 59 | extract this information. A method to obtain human-readable error | ||
| 60 | messages is described in L<ERR_error_string(3)|ERR_error_string(3)>. | ||
| 61 | |||
| 62 | L<ERR_clear_error(3)|ERR_clear_error(3)> can be used to clear the | ||
| 63 | error queue. | ||
| 64 | |||
| 65 | Note that L<ERR_remove_state(3)|ERR_remove_state(3)> should be used to | ||
| 66 | avoid memory leaks when threads are terminated. | ||
| 67 | |||
| 68 | =head1 ADDING NEW ERROR CODES TO OPENSSL | ||
| 69 | |||
| 70 | See L<ERR_put_error(3)> if you want to record error codes in the | ||
| 71 | OpenSSL error system from within your application. | ||
| 72 | |||
| 73 | The remainder of this section is of interest only if you want to add | ||
| 74 | new error codes to OpenSSL or add error codes from external libraries. | ||
| 75 | |||
| 76 | =head2 Reporting errors | ||
| 77 | |||
| 78 | Each sub-library has a specific macro XXXerr() that is used to report | ||
| 79 | errors. Its first argument is a function code B<XXX_F_...>, the second | ||
| 80 | argument is a reason code B<XXX_R_...>. Function codes are derived | ||
| 81 | from the function names; reason codes consist of textual error | ||
| 82 | descriptions. For example, the function ssl23_read() reports a | ||
| 83 | "handshake failure" as follows: | ||
| 84 | |||
| 85 | SSLerr(SSL_F_SSL23_READ, SSL_R_SSL_HANDSHAKE_FAILURE); | ||
| 86 | |||
| 87 | Function and reason codes should consist of upper case characters, | ||
| 88 | numbers and underscores only. The error file generation script translates | ||
| 89 | function codes into function names by looking in the header files | ||
| 90 | for an appropriate function name, if none is found it just uses | ||
| 91 | the capitalized form such as "SSL23_READ" in the above example. | ||
| 92 | |||
| 93 | The trailing section of a reason code (after the "_R_") is translated | ||
| 94 | into lower case and underscores changed to spaces. | ||
| 95 | |||
| 96 | When you are using new function or reason codes, run B<make errors>. | ||
| 97 | The necessary B<#define>s will then automatically be added to the | ||
| 98 | sub-library's header file. | ||
| 99 | |||
| 100 | Although a library will normally report errors using its own specific | ||
| 101 | XXXerr macro, another library's macro can be used. This is normally | ||
| 102 | only done when a library wants to include ASN1 code which must use | ||
| 103 | the ASN1err() macro. | ||
| 104 | |||
| 105 | =head2 Adding new libraries | ||
| 106 | |||
| 107 | When adding a new sub-library to OpenSSL, assign it a library number | ||
| 108 | B<ERR_LIB_XXX>, define a macro XXXerr() (both in B<err.h>), add its | ||
| 109 | name to B<ERR_str_libraries[]> (in B<crypto/err/err.c>), and add | ||
| 110 | C<ERR_load_XXX_strings()> to the ERR_load_crypto_strings() function | ||
| 111 | (in B<crypto/err/err_all.c>). Finally, add an entry | ||
| 112 | |||
| 113 | L XXX xxx.h xxx_err.c | ||
| 114 | |||
| 115 | to B<crypto/err/openssl.ec>, and add B<xxx_err.c> to the Makefile. | ||
| 116 | Running B<make errors> will then generate a file B<xxx_err.c>, and | ||
| 117 | add all error codes used in the library to B<xxx.h>. | ||
| 118 | |||
| 119 | Additionally the library include file must have a certain form. | ||
| 120 | Typically it will initially look like this: | ||
| 121 | |||
| 122 | #ifndef HEADER_XXX_H | ||
| 123 | #define HEADER_XXX_H | ||
| 124 | |||
| 125 | #ifdef __cplusplus | ||
| 126 | extern "C" { | ||
| 127 | #endif | ||
| 128 | |||
| 129 | /* Include files */ | ||
| 130 | |||
| 131 | #include <openssl/bio.h> | ||
| 132 | #include <openssl/x509.h> | ||
| 133 | |||
| 134 | /* Macros, structures and function prototypes */ | ||
| 135 | |||
| 136 | |||
| 137 | /* BEGIN ERROR CODES */ | ||
| 138 | |||
| 139 | The B<BEGIN ERROR CODES> sequence is used by the error code | ||
| 140 | generation script as the point to place new error codes, any text | ||
| 141 | after this point will be overwritten when B<make errors> is run. | ||
| 142 | The closing #endif etc will be automatically added by the script. | ||
| 143 | |||
| 144 | The generated C error code file B<xxx_err.c> will load the header | ||
| 145 | files B<stdio.h>, B<openssl/err.h> and B<openssl/xxx.h> so the | ||
| 146 | header file must load any additional header files containing any | ||
| 147 | definitions it uses. | ||
| 148 | |||
| 149 | =head1 USING ERROR CODES IN EXTERNAL LIBRARIES | ||
| 150 | |||
| 151 | It is also possible to use OpenSSL's error code scheme in external | ||
| 152 | libraries. The library needs to load its own codes and call the OpenSSL | ||
| 153 | error code insertion script B<mkerr.pl> explicitly to add codes to | ||
| 154 | the header file and generate the C error code file. This will normally | ||
| 155 | be done if the external library needs to generate new ASN1 structures | ||
| 156 | but it can also be used to add more general purpose error code handling. | ||
| 157 | |||
| 158 | =head1 INTERNALS | ||
| 159 | |||
| 160 | The error queues are stored in a hash table with one B<ERR_STATE> | ||
| 161 | entry for each pid. ERR_get_state() returns the current thread's | ||
| 162 | B<ERR_STATE>. An B<ERR_STATE> can hold up to B<ERR_NUM_ERRORS> error | ||
| 163 | codes. When more error codes are added, the old ones are overwritten, | ||
| 164 | on the assumption that the most recent errors are most important. | ||
| 165 | |||
| 166 | Error strings are also stored in hash table. The hash tables can | ||
| 167 | be obtained by calling ERR_get_err_state_table(void) and | ||
| 168 | ERR_get_string_table(void) respectively. | ||
| 169 | |||
| 170 | =head1 SEE ALSO | ||
| 171 | |||
| 172 | L<CRYPTO_set_id_callback(3)|CRYPTO_set_id_callback(3)>, | ||
| 173 | L<CRYPTO_set_locking_callback(3)|CRYPTO_set_locking_callback(3)>, | ||
| 174 | L<ERR_get_error(3)|ERR_get_error(3)>, | ||
| 175 | L<ERR_GET_LIB(3)|ERR_GET_LIB(3)>, | ||
| 176 | L<ERR_clear_error(3)|ERR_clear_error(3)>, | ||
| 177 | L<ERR_error_string(3)|ERR_error_string(3)>, | ||
| 178 | L<ERR_print_errors(3)|ERR_print_errors(3)>, | ||
| 179 | L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, | ||
| 180 | L<ERR_remove_state(3)|ERR_remove_state(3)>, | ||
| 181 | L<ERR_put_error(3)|ERR_put_error(3)>, | ||
| 182 | L<ERR_load_strings(3)|ERR_load_strings(3)>, | ||
| 183 | L<SSL_get_error(3)|SSL_get_error(3)> | ||
| 184 | |||
| 185 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_GET_LIB.pod b/src/lib/libcrypto/doc/ERR_GET_LIB.pod deleted file mode 100644 index 2a129da036..0000000000 --- a/src/lib/libcrypto/doc/ERR_GET_LIB.pod +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON - get library, function and | ||
| 6 | reason code | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/err.h> | ||
| 11 | |||
| 12 | int ERR_GET_LIB(unsigned long e); | ||
| 13 | |||
| 14 | int ERR_GET_FUNC(unsigned long e); | ||
| 15 | |||
| 16 | int ERR_GET_REASON(unsigned long e); | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | The error code returned by ERR_get_error() consists of a library | ||
| 21 | number, function code and reason code. ERR_GET_LIB(), ERR_GET_FUNC() | ||
| 22 | and ERR_GET_REASON() can be used to extract these. | ||
| 23 | |||
| 24 | The library number and function code describe where the error | ||
| 25 | occurred, the reason code is the information about what went wrong. | ||
| 26 | |||
| 27 | Each sub-library of OpenSSL has a unique library number; function and | ||
| 28 | reason codes are unique within each sub-library. Note that different | ||
| 29 | libraries may use the same value to signal different functions and | ||
| 30 | reasons. | ||
| 31 | |||
| 32 | B<ERR_R_...> reason codes such as B<ERR_R_MALLOC_FAILURE> are globally | ||
| 33 | unique. However, when checking for sub-library specific reason codes, | ||
| 34 | be sure to also compare the library number. | ||
| 35 | |||
| 36 | ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are macros. | ||
| 37 | |||
| 38 | =head1 RETURN VALUES | ||
| 39 | |||
| 40 | The library number, function code and reason code respectively. | ||
| 41 | |||
| 42 | =head1 SEE ALSO | ||
| 43 | |||
| 44 | L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)> | ||
| 45 | |||
| 46 | =head1 HISTORY | ||
| 47 | |||
| 48 | ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are available in | ||
| 49 | all versions of SSLeay and OpenSSL. | ||
| 50 | |||
| 51 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_clear_error.pod b/src/lib/libcrypto/doc/ERR_clear_error.pod deleted file mode 100644 index 566e1f4e31..0000000000 --- a/src/lib/libcrypto/doc/ERR_clear_error.pod +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_clear_error - clear the error queue | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/err.h> | ||
| 10 | |||
| 11 | void ERR_clear_error(void); | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | ERR_clear_error() empties the current thread's error queue. | ||
| 16 | |||
| 17 | =head1 RETURN VALUES | ||
| 18 | |||
| 19 | ERR_clear_error() has no return value. | ||
| 20 | |||
| 21 | =head1 SEE ALSO | ||
| 22 | |||
| 23 | L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)> | ||
| 24 | |||
| 25 | =head1 HISTORY | ||
| 26 | |||
| 27 | ERR_clear_error() is available in all versions of SSLeay and OpenSSL. | ||
| 28 | |||
| 29 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_error_string.pod b/src/lib/libcrypto/doc/ERR_error_string.pod deleted file mode 100644 index cdfa7fe1fe..0000000000 --- a/src/lib/libcrypto/doc/ERR_error_string.pod +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_error_string, ERR_error_string_n, ERR_lib_error_string, | ||
| 6 | ERR_func_error_string, ERR_reason_error_string - obtain human-readable | ||
| 7 | error message | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | #include <openssl/err.h> | ||
| 12 | |||
| 13 | char *ERR_error_string(unsigned long e, char *buf); | ||
| 14 | void ERR_error_string_n(unsigned long e, char *buf, size_t len); | ||
| 15 | |||
| 16 | const char *ERR_lib_error_string(unsigned long e); | ||
| 17 | const char *ERR_func_error_string(unsigned long e); | ||
| 18 | const char *ERR_reason_error_string(unsigned long e); | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | ERR_error_string() generates a human-readable string representing the | ||
| 23 | error code I<e>, and places it at I<buf>. I<buf> must be at least 120 | ||
| 24 | bytes long. If I<buf> is B<NULL>, the error string is placed in a | ||
| 25 | static buffer. | ||
| 26 | ERR_error_string_n() is a variant of ERR_error_string() that writes | ||
| 27 | at most I<len> characters (including the terminating 0) | ||
| 28 | and truncates the string if necessary. | ||
| 29 | For ERR_error_string_n(), I<buf> may not be B<NULL>. | ||
| 30 | |||
| 31 | The string will have the following format: | ||
| 32 | |||
| 33 | error:[error code]:[library name]:[function name]:[reason string] | ||
| 34 | |||
| 35 | I<error code> is an 8 digit hexadecimal number, I<library name>, | ||
| 36 | I<function name> and I<reason string> are ASCII text. | ||
| 37 | |||
| 38 | ERR_lib_error_string(), ERR_func_error_string() and | ||
| 39 | ERR_reason_error_string() return the library name, function | ||
| 40 | name and reason string respectively. | ||
| 41 | |||
| 42 | The OpenSSL error strings should be loaded by calling | ||
| 43 | L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)> or, for SSL | ||
| 44 | applications, L<SSL_load_error_strings(3)|SSL_load_error_strings(3)> | ||
| 45 | first. | ||
| 46 | If there is no text string registered for the given error code, | ||
| 47 | the error string will contain the numeric code. | ||
| 48 | |||
| 49 | L<ERR_print_errors(3)|ERR_print_errors(3)> can be used to print | ||
| 50 | all error codes currently in the queue. | ||
| 51 | |||
| 52 | =head1 RETURN VALUES | ||
| 53 | |||
| 54 | ERR_error_string() returns a pointer to a static buffer containing the | ||
| 55 | string if I<buf> B<== NULL>, I<buf> otherwise. | ||
| 56 | |||
| 57 | ERR_lib_error_string(), ERR_func_error_string() and | ||
| 58 | ERR_reason_error_string() return the strings, and B<NULL> if | ||
| 59 | none is registered for the error code. | ||
| 60 | |||
| 61 | =head1 SEE ALSO | ||
| 62 | |||
| 63 | L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, | ||
| 64 | L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, | ||
| 65 | L<SSL_load_error_strings(3)|SSL_load_error_strings(3)> | ||
| 66 | L<ERR_print_errors(3)|ERR_print_errors(3)> | ||
| 67 | |||
| 68 | =head1 HISTORY | ||
| 69 | |||
| 70 | ERR_error_string() is available in all versions of SSLeay and OpenSSL. | ||
| 71 | ERR_error_string_n() was added in OpenSSL 0.9.6. | ||
| 72 | |||
| 73 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_get_error.pod b/src/lib/libcrypto/doc/ERR_get_error.pod deleted file mode 100644 index 460a79f3f6..0000000000 --- a/src/lib/libcrypto/doc/ERR_get_error.pod +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_get_error, ERR_peek_error, ERR_peek_last_error, | ||
| 6 | ERR_get_error_line, ERR_peek_error_line, ERR_peek_last_error_line, | ||
| 7 | ERR_get_error_line_data, ERR_peek_error_line_data, | ||
| 8 | ERR_peek_last_error_line_data - obtain error code and data | ||
| 9 | |||
| 10 | =head1 SYNOPSIS | ||
| 11 | |||
| 12 | #include <openssl/err.h> | ||
| 13 | |||
| 14 | unsigned long ERR_get_error(void); | ||
| 15 | unsigned long ERR_peek_error(void); | ||
| 16 | unsigned long ERR_peek_last_error(void); | ||
| 17 | |||
| 18 | unsigned long ERR_get_error_line(const char **file, int *line); | ||
| 19 | unsigned long ERR_peek_error_line(const char **file, int *line); | ||
| 20 | unsigned long ERR_peek_last_error_line(const char **file, int *line); | ||
| 21 | |||
| 22 | unsigned long ERR_get_error_line_data(const char **file, int *line, | ||
| 23 | const char **data, int *flags); | ||
| 24 | unsigned long ERR_peek_error_line_data(const char **file, int *line, | ||
| 25 | const char **data, int *flags); | ||
| 26 | unsigned long ERR_peek_last_error_line_data(const char **file, int *line, | ||
| 27 | const char **data, int *flags); | ||
| 28 | |||
| 29 | =head1 DESCRIPTION | ||
| 30 | |||
| 31 | ERR_get_error() returns the earliest error code from the thread's error | ||
| 32 | queue and removes the entry. This function can be called repeatedly | ||
| 33 | until there are no more error codes to return. | ||
| 34 | |||
| 35 | ERR_peek_error() returns the earliest error code from the thread's | ||
| 36 | error queue without modifying it. | ||
| 37 | |||
| 38 | ERR_peek_last_error() returns the latest error code from the thread's | ||
| 39 | error queue without modifying it. | ||
| 40 | |||
| 41 | See L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> for obtaining information about | ||
| 42 | location and reason of the error, and | ||
| 43 | L<ERR_error_string(3)|ERR_error_string(3)> for human-readable error | ||
| 44 | messages. | ||
| 45 | |||
| 46 | ERR_get_error_line(), ERR_peek_error_line() and | ||
| 47 | ERR_peek_last_error_line() are the same as the above, but they | ||
| 48 | additionally store the file name and line number where | ||
| 49 | the error occurred in *B<file> and *B<line>, unless these are B<NULL>. | ||
| 50 | |||
| 51 | ERR_get_error_line_data(), ERR_peek_error_line_data() and | ||
| 52 | ERR_peek_last_error_line_data() store additional data and flags | ||
| 53 | associated with the error code in *B<data> | ||
| 54 | and *B<flags>, unless these are B<NULL>. *B<data> contains a string | ||
| 55 | if *B<flags>&B<ERR_TXT_STRING> is true. | ||
| 56 | |||
| 57 | An application B<MUST NOT> free the *B<data> pointer (or any other pointers | ||
| 58 | returned by these functions) with free() as freeing is handled | ||
| 59 | automatically by the error library. | ||
| 60 | |||
| 61 | =head1 RETURN VALUES | ||
| 62 | |||
| 63 | The error code, or 0 if there is no error in the queue. | ||
| 64 | |||
| 65 | =head1 SEE ALSO | ||
| 66 | |||
| 67 | L<err(3)|err(3)>, L<ERR_error_string(3)|ERR_error_string(3)>, | ||
| 68 | L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> | ||
| 69 | |||
| 70 | =head1 HISTORY | ||
| 71 | |||
| 72 | ERR_get_error(), ERR_peek_error(), ERR_get_error_line() and | ||
| 73 | ERR_peek_error_line() are available in all versions of SSLeay and | ||
| 74 | OpenSSL. ERR_get_error_line_data() and ERR_peek_error_line_data() | ||
| 75 | were added in SSLeay 0.9.0. | ||
| 76 | ERR_peek_last_error(), ERR_peek_last_error_line() and | ||
| 77 | ERR_peek_last_error_line_data() were added in OpenSSL 0.9.7. | ||
| 78 | |||
| 79 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_load_crypto_strings.pod b/src/lib/libcrypto/doc/ERR_load_crypto_strings.pod deleted file mode 100644 index 9bdec75a46..0000000000 --- a/src/lib/libcrypto/doc/ERR_load_crypto_strings.pod +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_load_crypto_strings, SSL_load_error_strings, ERR_free_strings - | ||
| 6 | load and free error strings | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/err.h> | ||
| 11 | |||
| 12 | void ERR_load_crypto_strings(void); | ||
| 13 | void ERR_free_strings(void); | ||
| 14 | |||
| 15 | #include <openssl/ssl.h> | ||
| 16 | |||
| 17 | void SSL_load_error_strings(void); | ||
| 18 | |||
| 19 | =head1 DESCRIPTION | ||
| 20 | |||
| 21 | ERR_load_crypto_strings() registers the error strings for all | ||
| 22 | B<libcrypto> functions. SSL_load_error_strings() does the same, | ||
| 23 | but also registers the B<libssl> error strings. | ||
| 24 | |||
| 25 | One of these functions should be called before generating | ||
| 26 | textual error messages. However, this is not required when memory | ||
| 27 | usage is an issue. | ||
| 28 | |||
| 29 | ERR_free_strings() frees all previously loaded error strings. | ||
| 30 | |||
| 31 | =head1 RETURN VALUES | ||
| 32 | |||
| 33 | ERR_load_crypto_strings(), SSL_load_error_strings() and | ||
| 34 | ERR_free_strings() return no values. | ||
| 35 | |||
| 36 | =head1 SEE ALSO | ||
| 37 | |||
| 38 | L<err(3)|err(3)>, L<ERR_error_string(3)|ERR_error_string(3)> | ||
| 39 | |||
| 40 | =head1 HISTORY | ||
| 41 | |||
| 42 | ERR_load_error_strings(), SSL_load_error_strings() and | ||
| 43 | ERR_free_strings() are available in all versions of SSLeay and | ||
| 44 | OpenSSL. | ||
| 45 | |||
| 46 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_load_strings.pod b/src/lib/libcrypto/doc/ERR_load_strings.pod deleted file mode 100644 index e9c5cf0fc5..0000000000 --- a/src/lib/libcrypto/doc/ERR_load_strings.pod +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_load_strings, ERR_PACK, ERR_get_next_error_library - load | ||
| 6 | arbitrary error strings | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | #include <openssl/err.h> | ||
| 11 | |||
| 12 | void ERR_load_strings(int lib, ERR_STRING_DATA str[]); | ||
| 13 | |||
| 14 | int ERR_get_next_error_library(void); | ||
| 15 | |||
| 16 | unsigned long ERR_PACK(int lib, int func, int reason); | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | ERR_load_strings() registers error strings for library number B<lib>. | ||
| 21 | |||
| 22 | B<str> is an array of error string data: | ||
| 23 | |||
| 24 | typedef struct ERR_string_data_st | ||
| 25 | { | ||
| 26 | unsigned long error; | ||
| 27 | char *string; | ||
| 28 | } ERR_STRING_DATA; | ||
| 29 | |||
| 30 | The error code is generated from the library number and a function and | ||
| 31 | reason code: B<error> = ERR_PACK(B<lib>, B<func>, B<reason>). | ||
| 32 | ERR_PACK() is a macro. | ||
| 33 | |||
| 34 | The last entry in the array is {0,0}. | ||
| 35 | |||
| 36 | ERR_get_next_error_library() can be used to assign library numbers | ||
| 37 | to user libraries at runtime. | ||
| 38 | |||
| 39 | =head1 RETURN VALUE | ||
| 40 | |||
| 41 | ERR_PACK() return the error code. | ||
| 42 | ERR_get_next_error_library() returns a new library number. | ||
| 43 | |||
| 44 | =head1 SEE ALSO | ||
| 45 | |||
| 46 | L<err(3)|err(3)>, L<ERR_load_strings(3)|ERR_load_strings(3)> | ||
| 47 | |||
| 48 | =head1 HISTORY | ||
| 49 | |||
| 50 | ERR_load_error_strings() and ERR_PACK() are available in all versions | ||
| 51 | of SSLeay and OpenSSL. ERR_get_next_error_library() was added in | ||
| 52 | SSLeay 0.9.0. | ||
| 53 | |||
| 54 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_print_errors.pod b/src/lib/libcrypto/doc/ERR_print_errors.pod deleted file mode 100644 index b100a5fa2b..0000000000 --- a/src/lib/libcrypto/doc/ERR_print_errors.pod +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_print_errors, ERR_print_errors_fp - print error messages | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/err.h> | ||
| 10 | |||
| 11 | void ERR_print_errors(BIO *bp); | ||
| 12 | void ERR_print_errors_fp(FILE *fp); | ||
| 13 | |||
| 14 | =head1 DESCRIPTION | ||
| 15 | |||
| 16 | ERR_print_errors() is a convenience function that prints the error | ||
| 17 | strings for all errors that OpenSSL has recorded to B<bp>, thus | ||
| 18 | emptying the error queue. | ||
| 19 | |||
| 20 | ERR_print_errors_fp() is the same, except that the output goes to a | ||
| 21 | B<FILE>. | ||
| 22 | |||
| 23 | |||
| 24 | The error strings will have the following format: | ||
| 25 | |||
| 26 | [pid]:error:[error code]:[library name]:[function name]:[reason string]:[file name]:[line]:[optional text message] | ||
| 27 | |||
| 28 | I<error code> is an 8 digit hexadecimal number. I<library name>, | ||
| 29 | I<function name> and I<reason string> are ASCII text, as is I<optional | ||
| 30 | text message> if one was set for the respective error code. | ||
| 31 | |||
| 32 | If there is no text string registered for the given error code, | ||
| 33 | the error string will contain the numeric code. | ||
| 34 | |||
| 35 | =head1 RETURN VALUES | ||
| 36 | |||
| 37 | ERR_print_errors() and ERR_print_errors_fp() return no values. | ||
| 38 | |||
| 39 | =head1 SEE ALSO | ||
| 40 | |||
| 41 | L<err(3)|err(3)>, L<ERR_error_string(3)|ERR_error_string(3)>, | ||
| 42 | L<ERR_get_error(3)|ERR_get_error(3)>, | ||
| 43 | L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, | ||
| 44 | L<SSL_load_error_strings(3)|SSL_load_error_strings(3)> | ||
| 45 | |||
| 46 | =head1 HISTORY | ||
| 47 | |||
| 48 | ERR_print_errors() and ERR_print_errors_fp() | ||
| 49 | are available in all versions of SSLeay and OpenSSL. | ||
| 50 | |||
| 51 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_put_error.pod b/src/lib/libcrypto/doc/ERR_put_error.pod deleted file mode 100644 index acd241fbe4..0000000000 --- a/src/lib/libcrypto/doc/ERR_put_error.pod +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_put_error, ERR_add_error_data - record an error | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/err.h> | ||
| 10 | |||
| 11 | void ERR_put_error(int lib, int func, int reason, const char *file, | ||
| 12 | int line); | ||
| 13 | |||
| 14 | void ERR_add_error_data(int num, ...); | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | ERR_put_error() adds an error code to the thread's error queue. It | ||
| 19 | signals that the error of reason code B<reason> occurred in function | ||
| 20 | B<func> of library B<lib>, in line number B<line> of B<file>. | ||
| 21 | This function is usually called by a macro. | ||
| 22 | |||
| 23 | ERR_add_error_data() associates the concatenation of its B<num> string | ||
| 24 | arguments with the error code added last. | ||
| 25 | |||
| 26 | L<ERR_load_strings(3)|ERR_load_strings(3)> can be used to register | ||
| 27 | error strings so that the application can a generate human-readable | ||
| 28 | error messages for the error code. | ||
| 29 | |||
| 30 | =head1 RETURN VALUES | ||
| 31 | |||
| 32 | ERR_put_error() and ERR_add_error_data() return | ||
| 33 | no values. | ||
| 34 | |||
| 35 | =head1 SEE ALSO | ||
| 36 | |||
| 37 | L<err(3)|err(3)>, L<ERR_load_strings(3)|ERR_load_strings(3)> | ||
| 38 | |||
| 39 | =head1 HISTORY | ||
| 40 | |||
| 41 | ERR_put_error() is available in all versions of SSLeay and OpenSSL. | ||
| 42 | ERR_add_error_data() was added in SSLeay 0.9.0. | ||
| 43 | |||
| 44 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_remove_state.pod b/src/lib/libcrypto/doc/ERR_remove_state.pod deleted file mode 100644 index a4d38c17fd..0000000000 --- a/src/lib/libcrypto/doc/ERR_remove_state.pod +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_remove_thread_state, ERR_remove_state - free a thread's error queue | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/err.h> | ||
| 10 | |||
| 11 | void ERR_remove_thread_state(const CRYPTO_THREADID *tid); | ||
| 12 | |||
| 13 | Deprecated: | ||
| 14 | |||
| 15 | void ERR_remove_state(unsigned long pid); | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | ERR_remove_thread_state() frees the error queue associated with thread B<tid>. | ||
| 20 | If B<tid> == B<NULL>, the current thread will have its error queue removed. | ||
| 21 | |||
| 22 | Since error queue data structures are allocated automatically for new | ||
| 23 | threads, they must be freed when threads are terminated in order to | ||
| 24 | avoid memory leaks. | ||
| 25 | |||
| 26 | ERR_remove_state is deprecated and has been replaced by | ||
| 27 | ERR_remove_thread_state. Since threads in OpenSSL are no longer identified | ||
| 28 | by unsigned long values any argument to this function is ignored. Calling | ||
| 29 | ERR_remove_state is equivalent to B<ERR_remove_thread_state(NULL)>. | ||
| 30 | |||
| 31 | =head1 RETURN VALUE | ||
| 32 | |||
| 33 | ERR_remove_thread_state and ERR_remove_state() return no value. | ||
| 34 | |||
| 35 | =head1 SEE ALSO | ||
| 36 | |||
| 37 | L<err(3)|err(3)> | ||
| 38 | |||
| 39 | =head1 HISTORY | ||
| 40 | |||
| 41 | ERR_remove_state() is available in all versions of SSLeay and OpenSSL. It | ||
| 42 | was deprecated in OpenSSL 1.0.0 when ERR_remove_thread_state was introduced | ||
| 43 | and thread IDs were introduced to identify threads instead of 'unsigned long'. | ||
| 44 | |||
| 45 | =cut | ||
diff --git a/src/lib/libcrypto/doc/ERR_set_mark.pod b/src/lib/libcrypto/doc/ERR_set_mark.pod deleted file mode 100644 index d3ca4f2e77..0000000000 --- a/src/lib/libcrypto/doc/ERR_set_mark.pod +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | ERR_set_mark, ERR_pop_to_mark - set marks and pop errors until mark | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/err.h> | ||
| 10 | |||
| 11 | int ERR_set_mark(void); | ||
| 12 | |||
| 13 | int ERR_pop_to_mark(void); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | ERR_set_mark() sets a mark on the current topmost error record if there | ||
| 18 | is one. | ||
| 19 | |||
| 20 | ERR_pop_to_mark() will pop the top of the error stack until a mark is found. | ||
| 21 | The mark is then removed. If there is no mark, the whole stack is removed. | ||
| 22 | |||
| 23 | =head1 RETURN VALUES | ||
| 24 | |||
| 25 | ERR_set_mark() returns 0 if the error stack is empty, otherwise 1. | ||
| 26 | |||
| 27 | ERR_pop_to_mark() returns 0 if there was no mark in the error stack, which | ||
| 28 | implies that the stack became empty, otherwise 1. | ||
| 29 | |||
| 30 | =head1 SEE ALSO | ||
| 31 | |||
| 32 | L<err(3)|err(3)> | ||
| 33 | |||
| 34 | =head1 HISTORY | ||
| 35 | |||
| 36 | ERR_set_mark() and ERR_pop_to_mark() were added in OpenSSL 0.9.8. | ||
| 37 | |||
| 38 | =cut | ||
