diff options
author | jmc <> | 2016-11-17 21:06:16 +0000 |
---|---|---|
committer | jmc <> | 2016-11-17 21:06:16 +0000 |
commit | c9944c8d48b5197b5d660006e939e59e811e2713 (patch) | |
tree | 1fedd70e71c32db5d6e3a032a7ea408effdfe14b | |
parent | 97d8f4f2e9be51170c67b25d8bd287ad57bd0b36 (diff) | |
download | openbsd-c9944c8d48b5197b5d660006e939e59e811e2713.tar.gz openbsd-c9944c8d48b5197b5d660006e939e59e811e2713.tar.bz2 openbsd-c9944c8d48b5197b5d660006e939e59e811e2713.zip |
various cleanup;
-rw-r--r-- | src/lib/libcrypto/man/ERR.3 | 27 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ERR_GET_LIB.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ERR_error_string.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ERR_get_error.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ERR_load_crypto_strings.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ERR_load_strings.3 | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ERR_print_errors.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/ERR_put_error.3 | 6 |
8 files changed, 35 insertions, 36 deletions
diff --git a/src/lib/libcrypto/man/ERR.3 b/src/lib/libcrypto/man/ERR.3 index b788942c4c..6818a1cf46 100644 --- a/src/lib/libcrypto/man/ERR.3 +++ b/src/lib/libcrypto/man/ERR.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR.3,v 1.3 2016/11/06 16:12:53 schwarze Exp $ | 1 | .\" $OpenBSD: ERR.3,v 1.4 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR 3 | 4 | .Dt ERR 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -46,11 +46,11 @@ Each sub-library has a specific macro | |||
46 | .Fn XXXerr f r | 46 | .Fn XXXerr f r |
47 | that is used to report errors. | 47 | that is used to report errors. |
48 | Its first argument is a function code | 48 | Its first argument is a function code |
49 | .Dv XXX_F_* , | 49 | .Dv XXX_F_* ; |
50 | the second argument is a reason code | 50 | the second argument is a reason code |
51 | .Dv XXX_R_* . | 51 | .Dv XXX_R_* . |
52 | Function codes are derived from the function names; reason codes consist | 52 | Function codes are derived from the function names |
53 | of textual error descriptions. | 53 | whereas reason codes consist of textual error descriptions. |
54 | For example, the function | 54 | For example, the function |
55 | .Fn ssl23_read | 55 | .Fn ssl23_read |
56 | reports a "handshake failure" as follows: | 56 | reports a "handshake failure" as follows: |
@@ -60,8 +60,8 @@ reports a "handshake failure" as follows: | |||
60 | Function and reason codes should consist of upper case characters, | 60 | Function and reason codes should consist of upper case characters, |
61 | numbers and underscores only. | 61 | numbers and underscores only. |
62 | The error file generation script translates function codes into function | 62 | The error file generation script translates function codes into function |
63 | names by looking in the header files for an appropriate function name, | 63 | names by looking in the header files for an appropriate function name. |
64 | if none is found it just uses the capitalized form such as "SSL23_READ" | 64 | If none is found it just uses the capitalized form such as "SSL23_READ" |
65 | in the above example. | 65 | in the above example. |
66 | .Pp | 66 | .Pp |
67 | The trailing section of a reason code (after the "_R_") is translated | 67 | The trailing section of a reason code (after the "_R_") is translated |
@@ -76,7 +76,7 @@ will then automatically be added to the sub-library's header file. | |||
76 | Although a library will normally report errors using its own specific | 76 | Although a library will normally report errors using its own specific |
77 | .Fn XXXerr | 77 | .Fn XXXerr |
78 | macro, another library's macro can be used. | 78 | macro, another library's macro can be used. |
79 | This is normally only done when a library wants to include ASN1 code | 79 | This is normally only done when a library wants to include ASN.1 code |
80 | which must use the | 80 | which must use the |
81 | .Fn ASN1err | 81 | .Fn ASN1err |
82 | macro. | 82 | macro. |
@@ -137,8 +137,8 @@ extern "C" { | |||
137 | The | 137 | The |
138 | .Sy BEGIN ERROR CODES | 138 | .Sy BEGIN ERROR CODES |
139 | sequence is used by the error code generation script as the point to | 139 | sequence is used by the error code generation script as the point to |
140 | place new error codes, any text after this point will be overwritten | 140 | place new error codes. |
141 | when | 141 | Any text after this point will be overwritten when |
142 | .Sy make errors | 142 | .Sy make errors |
143 | is run. | 143 | is run. |
144 | The closing #endif etc. will be automatically added by the script. | 144 | The closing #endif etc. will be automatically added by the script. |
@@ -161,12 +161,12 @@ insertion script | |||
161 | explicitly to add codes to the header file and generate the C error code | 161 | explicitly to add codes to the header file and generate the C error code |
162 | file. | 162 | file. |
163 | This will normally be done if the external library needs to generate new | 163 | This will normally be done if the external library needs to generate new |
164 | ASN1 structures but it can also be used to add more general purpose | 164 | ASN.1 structures but it can also be used to add more general purpose |
165 | error code handling. | 165 | error code handling. |
166 | .Sh INTERNALS | 166 | .Sh INTERNALS |
167 | The error queues are stored in a hash table with one | 167 | The error queues are stored in a hash table with one |
168 | .Vt ERR_STATE | 168 | .Vt ERR_STATE |
169 | entry for each pid. | 169 | entry for each PID. |
170 | .Fn ERR_get_state | 170 | .Fn ERR_get_state |
171 | returns the current thread's | 171 | returns the current thread's |
172 | .Vt ERR_STATE . | 172 | .Vt ERR_STATE . |
@@ -178,13 +178,12 @@ error codes. | |||
178 | When more error codes are added, the old ones are overwritten, on the | 178 | When more error codes are added, the old ones are overwritten, on the |
179 | assumption that the most recent errors are most important. | 179 | assumption that the most recent errors are most important. |
180 | .Pp | 180 | .Pp |
181 | Error strings are also stored in hash table. | 181 | Error strings are also stored in a hash table. |
182 | The hash tables can be obtained by calling | 182 | The hash tables can be obtained by calling |
183 | .Fn ERR_get_err_state_table | 183 | .Fn ERR_get_err_state_table |
184 | and | 184 | and |
185 | .Fn ERR_get_string_table . | 185 | .Fn ERR_get_string_table . |
186 | .Sh SEE ALSO | 186 | .Sh SEE ALSO |
187 | .Xr CRYPTO_set_id_callback 3 , | ||
188 | .Xr CRYPTO_set_locking_callback 3 , | 187 | .Xr CRYPTO_set_locking_callback 3 , |
189 | .Xr ERR_clear_error 3 , | 188 | .Xr ERR_clear_error 3 , |
190 | .Xr ERR_error_string 3 , | 189 | .Xr ERR_error_string 3 , |
diff --git a/src/lib/libcrypto/man/ERR_GET_LIB.3 b/src/lib/libcrypto/man/ERR_GET_LIB.3 index ec569f6be2..285f3e7bc1 100644 --- a/src/lib/libcrypto/man/ERR_GET_LIB.3 +++ b/src/lib/libcrypto/man/ERR_GET_LIB.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR_GET_LIB.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ERR_GET_LIB.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR_GET_LIB 3 | 4 | .Dt ERR_GET_LIB 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -33,7 +33,7 @@ and | |||
33 | can be used to extract these. | 33 | can be used to extract these. |
34 | .Pp | 34 | .Pp |
35 | The library number and function code describe where the error occurred, | 35 | The library number and function code describe where the error occurred, |
36 | the reason code is the information about what went wrong. | 36 | whereas the reason code is the information about what went wrong. |
37 | .Pp | 37 | .Pp |
38 | Each sub-library of OpenSSL has a unique library number; function and | 38 | Each sub-library of OpenSSL has a unique library number; function and |
39 | reason codes are unique within each sub-library. | 39 | reason codes are unique within each sub-library. |
diff --git a/src/lib/libcrypto/man/ERR_error_string.3 b/src/lib/libcrypto/man/ERR_error_string.3 index e516fa2703..13b37ea71a 100644 --- a/src/lib/libcrypto/man/ERR_error_string.3 +++ b/src/lib/libcrypto/man/ERR_error_string.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR_error_string.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ERR_error_string.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR_ERROR_STRING 3 | 4 | .Dt ERR_ERROR_STRING 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -65,7 +65,7 @@ The string will have the following format: | |||
65 | .Pp | 65 | .Pp |
66 | .Dl error:[error code]:[library name]:[function name]:[reason string] | 66 | .Dl error:[error code]:[library name]:[function name]:[reason string] |
67 | .Pp | 67 | .Pp |
68 | The error code is an 8 digit hexadecimal number. | 68 | The error code is an 8-digit hexadecimal number. |
69 | The library name, the function name, and the reason string are ASCII | 69 | The library name, the function name, and the reason string are ASCII |
70 | text. | 70 | text. |
71 | .Pp | 71 | .Pp |
diff --git a/src/lib/libcrypto/man/ERR_get_error.3 b/src/lib/libcrypto/man/ERR_get_error.3 index de526a9cde..ddca2df6db 100644 --- a/src/lib/libcrypto/man/ERR_get_error.3 +++ b/src/lib/libcrypto/man/ERR_get_error.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR_get_error.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ERR_get_error.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR_GET_ERROR 3 | 4 | .Dt ERR_GET_ERROR 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -75,7 +75,7 @@ modifying it. | |||
75 | .Pp | 75 | .Pp |
76 | See | 76 | See |
77 | .Xr ERR_GET_LIB 3 | 77 | .Xr ERR_GET_LIB 3 |
78 | for obtaining information about location and reason of the error, and | 78 | for obtaining information about the location and reason for the error, and |
79 | .Xr ERR_error_string 3 | 79 | .Xr ERR_error_string 3 |
80 | for human-readable error messages. | 80 | for human-readable error messages. |
81 | .Pp | 81 | .Pp |
diff --git a/src/lib/libcrypto/man/ERR_load_crypto_strings.3 b/src/lib/libcrypto/man/ERR_load_crypto_strings.3 index 51ee650b0c..1c4a7316d4 100644 --- a/src/lib/libcrypto/man/ERR_load_crypto_strings.3 +++ b/src/lib/libcrypto/man/ERR_load_crypto_strings.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR_load_crypto_strings.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ERR_load_crypto_strings.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR_LOAD_CRYPTO_STRINGS 3 | 4 | .Dt ERR_LOAD_CRYPTO_STRINGS 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -43,7 +43,7 @@ return no values. | |||
43 | .Xr ERR 3 , | 43 | .Xr ERR 3 , |
44 | .Xr ERR_error_string 3 | 44 | .Xr ERR_error_string 3 |
45 | .Sh HISTORY | 45 | .Sh HISTORY |
46 | .Xr ERR_load_error_strings 3 , | 46 | .Fn ERR_load_crypto_strings , |
47 | .Fn SSL_load_error_strings , | 47 | .Fn SSL_load_error_strings , |
48 | and | 48 | and |
49 | .Fn ERR_free_strings | 49 | .Fn ERR_free_strings |
diff --git a/src/lib/libcrypto/man/ERR_load_strings.3 b/src/lib/libcrypto/man/ERR_load_strings.3 index 780d0869fa..414ba74797 100644 --- a/src/lib/libcrypto/man/ERR_load_strings.3 +++ b/src/lib/libcrypto/man/ERR_load_strings.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR_load_strings.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ERR_load_strings.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR_LOAD_STRINGS 3 | 4 | .Dt ERR_LOAD_STRINGS 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -15,14 +15,14 @@ | |||
15 | .Fa "int lib" | 15 | .Fa "int lib" |
16 | .Fa "ERR_STRING_DATA str[]" | 16 | .Fa "ERR_STRING_DATA str[]" |
17 | .Fc | 17 | .Fc |
18 | .Ft int | ||
19 | .Fn ERR_get_next_error_library void | ||
20 | .Ft unsigned long | 18 | .Ft unsigned long |
21 | .Fo ERR_PACK | 19 | .Fo ERR_PACK |
22 | .Fa "int lib" | 20 | .Fa "int lib" |
23 | .Fa "int func" | 21 | .Fa "int func" |
24 | .Fa "int reason" | 22 | .Fa "int reason" |
25 | .Fc | 23 | .Fc |
24 | .Ft int | ||
25 | .Fn ERR_get_next_error_library void | ||
26 | .Sh DESCRIPTION | 26 | .Sh DESCRIPTION |
27 | .Fn ERR_load_strings | 27 | .Fn ERR_load_strings |
28 | registers error strings for library number | 28 | registers error strings for library number |
diff --git a/src/lib/libcrypto/man/ERR_print_errors.3 b/src/lib/libcrypto/man/ERR_print_errors.3 index 74b4442b1a..47ca34068f 100644 --- a/src/lib/libcrypto/man/ERR_print_errors.3 +++ b/src/lib/libcrypto/man/ERR_print_errors.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR_print_errors.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ERR_print_errors.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR_PRINT_ERRORS 3 | 4 | .Dt ERR_PRINT_ERRORS 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -34,7 +34,7 @@ The error strings have the following format: | |||
34 | [file name]:[line]:[optional text message] | 34 | [file name]:[line]:[optional text message] |
35 | .Ed | 35 | .Ed |
36 | .Pp | 36 | .Pp |
37 | The error code is an 8 digit hexadecimal number. | 37 | The error code is an 8-digit hexadecimal number. |
38 | The library name, the function name, and the reason string are ASCII | 38 | The library name, the function name, and the reason string are ASCII |
39 | text, as is the optional text message if one was set for the | 39 | text, as is the optional text message if one was set for the |
40 | respective error code. | 40 | respective error code. |
diff --git a/src/lib/libcrypto/man/ERR_put_error.3 b/src/lib/libcrypto/man/ERR_put_error.3 index 0b0a458b8d..496d975165 100644 --- a/src/lib/libcrypto/man/ERR_put_error.3 +++ b/src/lib/libcrypto/man/ERR_put_error.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: ERR_put_error.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ERR_put_error.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 17 2016 $ |
4 | .Dt ERR_PUT_ERROR 3 | 4 | .Dt ERR_PUT_ERROR 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -43,7 +43,7 @@ associates the concatenation of its | |||
43 | string arguments with the error code added last. | 43 | string arguments with the error code added last. |
44 | .Pp | 44 | .Pp |
45 | .Xr ERR_load_strings 3 | 45 | .Xr ERR_load_strings 3 |
46 | can be used to register error strings so that the application can a | 46 | can be used to register error strings so that the application can |
47 | generate human-readable error messages for the error code. | 47 | generate human-readable error messages for the error code. |
48 | .Sh RETURN VALUES | 48 | .Sh RETURN VALUES |
49 | .Fn ERR_put_error | 49 | .Fn ERR_put_error |