diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2016-11-17 21:06:17 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2016-11-17 21:06:17 +0000 |
commit | 1c640bd3bea4af1247d90dbe6367a77143103a4f (patch) | |
tree | b3d86136f2eb0d2fd91934b84c2fc4a39767bbdd | |
parent | 78cd421d84646ec0ce1a76cca391d854e48b22a4 (diff) |
various cleanup;
-rw-r--r-- | lib/libcrypto/man/ERR.3 | 27 | ||||
-rw-r--r-- | lib/libcrypto/man/ERR_GET_LIB.3 | 6 | ||||
-rw-r--r-- | lib/libcrypto/man/ERR_error_string.3 | 6 | ||||
-rw-r--r-- | lib/libcrypto/man/ERR_get_error.3 | 6 | ||||
-rw-r--r-- | lib/libcrypto/man/ERR_load_crypto_strings.3 | 6 | ||||
-rw-r--r-- | lib/libcrypto/man/ERR_load_strings.3 | 8 | ||||
-rw-r--r-- | lib/libcrypto/man/ERR_print_errors.3 | 6 | ||||
-rw-r--r-- | lib/libcrypto/man/ERR_put_error.3 | 6 |
8 files changed, 35 insertions, 36 deletions
diff --git a/lib/libcrypto/man/ERR.3 b/lib/libcrypto/man/ERR.3 index b788942c4ce..6818a1cf46b 100644 --- a/lib/libcrypto/man/ERR.3 +++ b/lib/libcrypto/man/ERR.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR.3,v 1.3 2016/11/06 16:12:53 schwarze Exp $ +.\" $OpenBSD: ERR.3,v 1.4 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR 3 .Os .Sh NAME @@ -46,11 +46,11 @@ Each sub-library has a specific macro .Fn XXXerr f r that is used to report errors. Its first argument is a function code -.Dv XXX_F_* , +.Dv XXX_F_* ; the second argument is a reason code .Dv XXX_R_* . -Function codes are derived from the function names; reason codes consist -of textual error descriptions. +Function codes are derived from the function names +whereas reason codes consist of textual error descriptions. For example, the function .Fn ssl23_read reports a "handshake failure" as follows: @@ -60,8 +60,8 @@ reports a "handshake failure" as follows: Function and reason codes should consist of upper case characters, numbers and underscores only. The error file generation script translates function codes into function -names by looking in the header files for an appropriate function name, -if none is found it just uses the capitalized form such as "SSL23_READ" +names by looking in the header files for an appropriate function name. +If none is found it just uses the capitalized form such as "SSL23_READ" in the above example. .Pp 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. Although a library will normally report errors using its own specific .Fn XXXerr macro, another library's macro can be used. -This is normally only done when a library wants to include ASN1 code +This is normally only done when a library wants to include ASN.1 code which must use the .Fn ASN1err macro. @@ -137,8 +137,8 @@ extern "C" { The .Sy BEGIN ERROR CODES sequence is used by the error code generation script as the point to -place new error codes, any text after this point will be overwritten -when +place new error codes. +Any text after this point will be overwritten when .Sy make errors is run. The closing #endif etc. will be automatically added by the script. @@ -161,12 +161,12 @@ insertion script explicitly to add codes to the header file and generate the C error code file. This will normally be done if the external library needs to generate new -ASN1 structures but it can also be used to add more general purpose +ASN.1 structures but it can also be used to add more general purpose error code handling. .Sh INTERNALS The error queues are stored in a hash table with one .Vt ERR_STATE -entry for each pid. +entry for each PID. .Fn ERR_get_state returns the current thread's .Vt ERR_STATE . @@ -178,13 +178,12 @@ error codes. When more error codes are added, the old ones are overwritten, on the assumption that the most recent errors are most important. .Pp -Error strings are also stored in hash table. +Error strings are also stored in a hash table. The hash tables can be obtained by calling .Fn ERR_get_err_state_table and .Fn ERR_get_string_table . .Sh SEE ALSO -.Xr CRYPTO_set_id_callback 3 , .Xr CRYPTO_set_locking_callback 3 , .Xr ERR_clear_error 3 , .Xr ERR_error_string 3 , diff --git a/lib/libcrypto/man/ERR_GET_LIB.3 b/lib/libcrypto/man/ERR_GET_LIB.3 index ec569f6be25..285f3e7bc10 100644 --- a/lib/libcrypto/man/ERR_GET_LIB.3 +++ b/lib/libcrypto/man/ERR_GET_LIB.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR_GET_LIB.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: ERR_GET_LIB.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR_GET_LIB 3 .Os .Sh NAME @@ -33,7 +33,7 @@ and can be used to extract these. .Pp The library number and function code describe where the error occurred, -the reason code is the information about what went wrong. +whereas the reason code is the information about what went wrong. .Pp Each sub-library of OpenSSL has a unique library number; function and reason codes are unique within each sub-library. diff --git a/lib/libcrypto/man/ERR_error_string.3 b/lib/libcrypto/man/ERR_error_string.3 index e516fa27033..13b37ea71a7 100644 --- a/lib/libcrypto/man/ERR_error_string.3 +++ b/lib/libcrypto/man/ERR_error_string.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR_error_string.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: ERR_error_string.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR_ERROR_STRING 3 .Os .Sh NAME @@ -65,7 +65,7 @@ The string will have the following format: .Pp .Dl error:[error code]:[library name]:[function name]:[reason string] .Pp -The error code is an 8 digit hexadecimal number. +The error code is an 8-digit hexadecimal number. The library name, the function name, and the reason string are ASCII text. .Pp diff --git a/lib/libcrypto/man/ERR_get_error.3 b/lib/libcrypto/man/ERR_get_error.3 index de526a9cde0..ddca2df6dbb 100644 --- a/lib/libcrypto/man/ERR_get_error.3 +++ b/lib/libcrypto/man/ERR_get_error.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR_get_error.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: ERR_get_error.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR_GET_ERROR 3 .Os .Sh NAME @@ -75,7 +75,7 @@ modifying it. .Pp See .Xr ERR_GET_LIB 3 -for obtaining information about location and reason of the error, and +for obtaining information about the location and reason for the error, and .Xr ERR_error_string 3 for human-readable error messages. .Pp diff --git a/lib/libcrypto/man/ERR_load_crypto_strings.3 b/lib/libcrypto/man/ERR_load_crypto_strings.3 index 51ee650b0c0..1c4a7316d4e 100644 --- a/lib/libcrypto/man/ERR_load_crypto_strings.3 +++ b/lib/libcrypto/man/ERR_load_crypto_strings.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR_LOAD_CRYPTO_STRINGS 3 .Os .Sh NAME @@ -43,7 +43,7 @@ return no values. .Xr ERR 3 , .Xr ERR_error_string 3 .Sh HISTORY -.Xr ERR_load_error_strings 3 , +.Fn ERR_load_crypto_strings , .Fn SSL_load_error_strings , and .Fn ERR_free_strings diff --git a/lib/libcrypto/man/ERR_load_strings.3 b/lib/libcrypto/man/ERR_load_strings.3 index 780d0869fa4..414ba74797d 100644 --- a/lib/libcrypto/man/ERR_load_strings.3 +++ b/lib/libcrypto/man/ERR_load_strings.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR_load_strings.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: ERR_load_strings.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR_LOAD_STRINGS 3 .Os .Sh NAME @@ -15,14 +15,14 @@ .Fa "int lib" .Fa "ERR_STRING_DATA str[]" .Fc -.Ft int -.Fn ERR_get_next_error_library void .Ft unsigned long .Fo ERR_PACK .Fa "int lib" .Fa "int func" .Fa "int reason" .Fc +.Ft int +.Fn ERR_get_next_error_library void .Sh DESCRIPTION .Fn ERR_load_strings registers error strings for library number diff --git a/lib/libcrypto/man/ERR_print_errors.3 b/lib/libcrypto/man/ERR_print_errors.3 index 74b4442b1a2..47ca34068f4 100644 --- a/lib/libcrypto/man/ERR_print_errors.3 +++ b/lib/libcrypto/man/ERR_print_errors.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR_print_errors.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: ERR_print_errors.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR_PRINT_ERRORS 3 .Os .Sh NAME @@ -34,7 +34,7 @@ The error strings have the following format: [file name]:[line]:[optional text message] .Ed .Pp -The error code is an 8 digit hexadecimal number. +The error code is an 8-digit hexadecimal number. The library name, the function name, and the reason string are ASCII text, as is the optional text message if one was set for the respective error code. diff --git a/lib/libcrypto/man/ERR_put_error.3 b/lib/libcrypto/man/ERR_put_error.3 index 0b0a458b8dc..496d9751654 100644 --- a/lib/libcrypto/man/ERR_put_error.3 +++ b/lib/libcrypto/man/ERR_put_error.3 @@ -1,6 +1,6 @@ -.\" $OpenBSD: ERR_put_error.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ +.\" $OpenBSD: ERR_put_error.3,v 1.3 2016/11/17 21:06:16 jmc Exp $ .\" -.Dd $Mdocdate: November 6 2016 $ +.Dd $Mdocdate: November 17 2016 $ .Dt ERR_PUT_ERROR 3 .Os .Sh NAME @@ -43,7 +43,7 @@ associates the concatenation of its string arguments with the error code added last. .Pp .Xr ERR_load_strings 3 -can be used to register error strings so that the application can a +can be used to register error strings so that the application can generate human-readable error messages for the error code. .Sh RETURN VALUES .Fn ERR_put_error |