summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmc <>2016-11-17 21:06:16 +0000
committerjmc <>2016-11-17 21:06:16 +0000
commitc9944c8d48b5197b5d660006e939e59e811e2713 (patch)
tree1fedd70e71c32db5d6e3a032a7ea408effdfe14b
parent97d8f4f2e9be51170c67b25d8bd287ad57bd0b36 (diff)
downloadopenbsd-c9944c8d48b5197b5d660006e939e59e811e2713.tar.gz
openbsd-c9944c8d48b5197b5d660006e939e59e811e2713.tar.bz2
openbsd-c9944c8d48b5197b5d660006e939e59e811e2713.zip
various cleanup;
-rw-r--r--src/lib/libcrypto/man/ERR.327
-rw-r--r--src/lib/libcrypto/man/ERR_GET_LIB.36
-rw-r--r--src/lib/libcrypto/man/ERR_error_string.36
-rw-r--r--src/lib/libcrypto/man/ERR_get_error.36
-rw-r--r--src/lib/libcrypto/man/ERR_load_crypto_strings.36
-rw-r--r--src/lib/libcrypto/man/ERR_load_strings.38
-rw-r--r--src/lib/libcrypto/man/ERR_print_errors.36
-rw-r--r--src/lib/libcrypto/man/ERR_put_error.36
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
47that is used to report errors. 47that is used to report errors.
48Its first argument is a function code 48Its first argument is a function code
49.Dv XXX_F_* , 49.Dv XXX_F_* ;
50the second argument is a reason code 50the second argument is a reason code
51.Dv XXX_R_* . 51.Dv XXX_R_* .
52Function codes are derived from the function names; reason codes consist 52Function codes are derived from the function names
53of textual error descriptions. 53whereas reason codes consist of textual error descriptions.
54For example, the function 54For example, the function
55.Fn ssl23_read 55.Fn ssl23_read
56reports a "handshake failure" as follows: 56reports a "handshake failure" as follows:
@@ -60,8 +60,8 @@ reports a "handshake failure" as follows:
60Function and reason codes should consist of upper case characters, 60Function and reason codes should consist of upper case characters,
61numbers and underscores only. 61numbers and underscores only.
62The error file generation script translates function codes into function 62The error file generation script translates function codes into function
63names by looking in the header files for an appropriate function name, 63names by looking in the header files for an appropriate function name.
64if none is found it just uses the capitalized form such as "SSL23_READ" 64If none is found it just uses the capitalized form such as "SSL23_READ"
65in the above example. 65in the above example.
66.Pp 66.Pp
67The trailing section of a reason code (after the "_R_") is translated 67The 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.
76Although a library will normally report errors using its own specific 76Although a library will normally report errors using its own specific
77.Fn XXXerr 77.Fn XXXerr
78macro, another library's macro can be used. 78macro, another library's macro can be used.
79This is normally only done when a library wants to include ASN1 code 79This is normally only done when a library wants to include ASN.1 code
80which must use the 80which must use the
81.Fn ASN1err 81.Fn ASN1err
82macro. 82macro.
@@ -137,8 +137,8 @@ extern "C" {
137The 137The
138.Sy BEGIN ERROR CODES 138.Sy BEGIN ERROR CODES
139sequence is used by the error code generation script as the point to 139sequence is used by the error code generation script as the point to
140place new error codes, any text after this point will be overwritten 140place new error codes.
141when 141Any text after this point will be overwritten when
142.Sy make errors 142.Sy make errors
143is run. 143is run.
144The closing #endif etc. will be automatically added by the script. 144The closing #endif etc. will be automatically added by the script.
@@ -161,12 +161,12 @@ insertion script
161explicitly to add codes to the header file and generate the C error code 161explicitly to add codes to the header file and generate the C error code
162file. 162file.
163This will normally be done if the external library needs to generate new 163This will normally be done if the external library needs to generate new
164ASN1 structures but it can also be used to add more general purpose 164ASN.1 structures but it can also be used to add more general purpose
165error code handling. 165error code handling.
166.Sh INTERNALS 166.Sh INTERNALS
167The error queues are stored in a hash table with one 167The error queues are stored in a hash table with one
168.Vt ERR_STATE 168.Vt ERR_STATE
169entry for each pid. 169entry for each PID.
170.Fn ERR_get_state 170.Fn ERR_get_state
171returns the current thread's 171returns the current thread's
172.Vt ERR_STATE . 172.Vt ERR_STATE .
@@ -178,13 +178,12 @@ error codes.
178When more error codes are added, the old ones are overwritten, on the 178When more error codes are added, the old ones are overwritten, on the
179assumption that the most recent errors are most important. 179assumption that the most recent errors are most important.
180.Pp 180.Pp
181Error strings are also stored in hash table. 181Error strings are also stored in a hash table.
182The hash tables can be obtained by calling 182The hash tables can be obtained by calling
183.Fn ERR_get_err_state_table 183.Fn ERR_get_err_state_table
184and 184and
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
33can be used to extract these. 33can be used to extract these.
34.Pp 34.Pp
35The library number and function code describe where the error occurred, 35The library number and function code describe where the error occurred,
36the reason code is the information about what went wrong. 36whereas the reason code is the information about what went wrong.
37.Pp 37.Pp
38Each sub-library of OpenSSL has a unique library number; function and 38Each sub-library of OpenSSL has a unique library number; function and
39reason codes are unique within each sub-library. 39reason 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
68The error code is an 8 digit hexadecimal number. 68The error code is an 8-digit hexadecimal number.
69The library name, the function name, and the reason string are ASCII 69The library name, the function name, and the reason string are ASCII
70text. 70text.
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
76See 76See
77.Xr ERR_GET_LIB 3 77.Xr ERR_GET_LIB 3
78for obtaining information about location and reason of the error, and 78for obtaining information about the location and reason for the error, and
79.Xr ERR_error_string 3 79.Xr ERR_error_string 3
80for human-readable error messages. 80for 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 ,
48and 48and
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
28registers error strings for library number 28registers 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
37The error code is an 8 digit hexadecimal number. 37The error code is an 8-digit hexadecimal number.
38The library name, the function name, and the reason string are ASCII 38The library name, the function name, and the reason string are ASCII
39text, as is the optional text message if one was set for the 39text, as is the optional text message if one was set for the
40respective error code. 40respective 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
43string arguments with the error code added last. 43string arguments with the error code added last.
44.Pp 44.Pp
45.Xr ERR_load_strings 3 45.Xr ERR_load_strings 3
46can be used to register error strings so that the application can a 46can be used to register error strings so that the application can
47generate human-readable error messages for the error code. 47generate 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