summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/ERR_error_string.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/doc/ERR_error_string.pod')
-rw-r--r--src/lib/libcrypto/doc/ERR_error_string.pod16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/libcrypto/doc/ERR_error_string.pod b/src/lib/libcrypto/doc/ERR_error_string.pod
index 0d2417599c..e01beb817a 100644
--- a/src/lib/libcrypto/doc/ERR_error_string.pod
+++ b/src/lib/libcrypto/doc/ERR_error_string.pod
@@ -2,13 +2,16 @@
2 2
3=head1 NAME 3=head1 NAME
4 4
5ERR_error_string - obtain human-readable error message 5ERR_error_string, ERR_error_string_n, ERR_lib_error_string,
6ERR_func_error_string, ERR_reason_error_string - obtain human-readable
7error message
6 8
7=head1 SYNOPSIS 9=head1 SYNOPSIS
8 10
9 #include <openssl/err.h> 11 #include <openssl/err.h>
10 12
11 char *ERR_error_string(unsigned long e, char *buf); 13 char *ERR_error_string(unsigned long e, char *buf);
14 char *ERR_error_string_n(unsigned long e, char *buf, size_t len);
12 15
13 const char *ERR_lib_error_string(unsigned long e); 16 const char *ERR_lib_error_string(unsigned long e);
14 const char *ERR_func_error_string(unsigned long e); 17 const char *ERR_func_error_string(unsigned long e);
@@ -17,9 +20,13 @@ ERR_error_string - obtain human-readable error message
17=head1 DESCRIPTION 20=head1 DESCRIPTION
18 21
19ERR_error_string() generates a human-readable string representing the 22ERR_error_string() generates a human-readable string representing the
20error code B<e>, and places it at B<buf>. B<buf> must be at least 120 23error code I<e>, and places it at I<buf>. I<buf> must be at least 120
21bytes long. If B<buf> is B<NULL>, the error string is placed in a 24bytes long. If I<buf> is B<NULL>, the error string is placed in a
22static buffer. 25static buffer.
26ERR_error_string_n() is a variant of ERR_error_string() that writes
27at most I<len> characters (including the terminating 0)
28and truncates the string if necessary.
29For ERR_error_string_n(), I<buf> may not be B<NULL>.
23 30
24The string will have the following format: 31The string will have the following format:
25 32
@@ -45,7 +52,7 @@ all error codes currently in the queue.
45=head1 RETURN VALUES 52=head1 RETURN VALUES
46 53
47ERR_error_string() returns a pointer to a static buffer containing the 54ERR_error_string() returns a pointer to a static buffer containing the
48string if B<buf == NULL>, B<buf> otherwise. 55string if I<buf> B<== NULL>, I<buf> otherwise.
49 56
50ERR_lib_error_string(), ERR_func_error_string() and 57ERR_lib_error_string(), ERR_func_error_string() and
51ERR_reason_error_string() return the strings, and B<NULL> if 58ERR_reason_error_string() return the strings, and B<NULL> if
@@ -61,5 +68,6 @@ L<ERR_print_errors(3)|ERR_print_errors(3)>
61=head1 HISTORY 68=head1 HISTORY
62 69
63ERR_error_string() is available in all versions of SSLeay and OpenSSL. 70ERR_error_string() is available in all versions of SSLeay and OpenSSL.
71ERR_error_string_n() was added in OpenSSL 0.9.6.
64 72
65=cut 73=cut