X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=doc%2Fcrypto%2FERR_error_string.pod;h=3518033b5bb2c1c1656d4f73b7e614e4debfabf8;hp=0d2417599cdace3fc4d64da95cf891b7240b062d;hb=e5c84d5152c11a3dfa436041d3336a6f403baad8;hpb=d49f3797a5a891ebc13ea12eb64c55d1eb53c5c1 diff --git a/doc/crypto/ERR_error_string.pod b/doc/crypto/ERR_error_string.pod index 0d2417599c..3518033b5b 100644 --- a/doc/crypto/ERR_error_string.pod +++ b/doc/crypto/ERR_error_string.pod @@ -9,6 +9,7 @@ ERR_error_string - obtain human-readable error message #include char *ERR_error_string(unsigned long e, char *buf); + char *ERR_error_string_n(unsigned long e, char *buf, size_t len); const char *ERR_lib_error_string(unsigned long e); const char *ERR_func_error_string(unsigned long e); @@ -17,9 +18,13 @@ ERR_error_string - obtain human-readable error message =head1 DESCRIPTION ERR_error_string() generates a human-readable string representing the -error code B, and places it at B. B must be at least 120 -bytes long. If B is B, the error string is placed in a +error code I, and places it at I. I must be at least 120 +bytes long. If I is B, the error string is placed in a static buffer. +ERR_error_string_n() is a variant of ERR_error_string() that writes +at most I characters (including the terminating 0) +and truncates the resulting string if necessary. +For ERR_error_string_n(), I may not be B. The string will have the following format: @@ -45,7 +50,7 @@ all error codes currently in the queue. =head1 RETURN VALUES ERR_error_string() returns a pointer to a static buffer containing the -string if B, B otherwise. +string if I B<== NULL>, I otherwise. ERR_lib_error_string(), ERR_func_error_string() and ERR_reason_error_string() return the strings, and B if @@ -61,5 +66,6 @@ L =head1 HISTORY ERR_error_string() is available in all versions of SSLeay and OpenSSL. +ERR_error_string_n() was added in OpenSSL 0.9.6. =cut