112 lines
3.9 KiB
HTML
112 lines
3.9 KiB
HTML
|
<?xml version="1.0" ?>
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<title>ERR_error_string</title>
|
||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||
|
<link rev="made" href="mailto:root@localhost" />
|
||
|
</head>
|
||
|
|
||
|
<body style="background-color: white">
|
||
|
|
||
|
|
||
|
<!-- INDEX BEGIN -->
|
||
|
<div name="index">
|
||
|
<p><a name="__index__"></a></p>
|
||
|
|
||
|
<ul>
|
||
|
|
||
|
<li><a href="#name">NAME</a></li>
|
||
|
<li><a href="#synopsis">SYNOPSIS</a></li>
|
||
|
<li><a href="#description">DESCRIPTION</a></li>
|
||
|
<li><a href="#return_values">RETURN VALUES</a></li>
|
||
|
<li><a href="#see_also">SEE ALSO</a></li>
|
||
|
<li><a href="#history">HISTORY</a></li>
|
||
|
<li><a href="#copyright">COPYRIGHT</a></li>
|
||
|
</ul>
|
||
|
|
||
|
<hr name="index" />
|
||
|
</div>
|
||
|
<!-- INDEX END -->
|
||
|
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="name">NAME</a></h1>
|
||
|
<p>ERR_error_string, ERR_error_string_n, ERR_lib_error_string,
|
||
|
ERR_func_error_string, ERR_reason_error_string - obtain human-readable
|
||
|
error message</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||
|
<pre>
|
||
|
#include <openssl/err.h></pre>
|
||
|
<pre>
|
||
|
char *ERR_error_string(unsigned long e, char *buf);
|
||
|
void ERR_error_string_n(unsigned long e, char *buf, size_t len);</pre>
|
||
|
<pre>
|
||
|
const char *ERR_lib_error_string(unsigned long e);
|
||
|
const char *ERR_reason_error_string(unsigned long e);</pre>
|
||
|
<p>Deprecated in OpenSSL 3.0:</p>
|
||
|
<pre>
|
||
|
const char *ERR_func_error_string(unsigned long e);</pre>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="description">DESCRIPTION</a></h1>
|
||
|
<p><code>ERR_error_string()</code> generates a human-readable string representing the
|
||
|
error code <em>e</em>, and places it at <em>buf</em>. <em>buf</em> must be at least 256
|
||
|
bytes long. If <em>buf</em> is <strong>NULL</strong>, the error string is placed in a
|
||
|
static buffer.
|
||
|
Note that this function is not thread-safe and does no checks on the size
|
||
|
of the buffer; use <code>ERR_error_string_n()</code> instead.</p>
|
||
|
<p><code>ERR_error_string_n()</code> is a variant of <code>ERR_error_string()</code> that writes
|
||
|
at most <em>len</em> characters (including the terminating 0)
|
||
|
and truncates the string if necessary.
|
||
|
For <code>ERR_error_string_n()</code>, <em>buf</em> may not be <strong>NULL</strong>.</p>
|
||
|
<p>The string will have the following format:</p>
|
||
|
<pre>
|
||
|
error:[error code]:[library name]::[reason string]</pre>
|
||
|
<p><em>error code</em> is an 8 digit hexadecimal number, <em>library name</em> and
|
||
|
<em>reason string</em> are ASCII text.</p>
|
||
|
<p><code>ERR_lib_error_string()</code> and <code>ERR_reason_error_string()</code> return the library
|
||
|
name and reason string respectively.</p>
|
||
|
<p>If there is no text string registered for the given error code,
|
||
|
the error string will contain the numeric code.</p>
|
||
|
<p><em>ERR_print_errors(3)</em> can be used to print
|
||
|
all error codes currently in the queue.</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="return_values">RETURN VALUES</a></h1>
|
||
|
<p><code>ERR_error_string()</code> returns a pointer to a static buffer containing the
|
||
|
string if <em>buf</em> <strong>== NULL</strong>, <em>buf</em> otherwise.</p>
|
||
|
<p><code>ERR_lib_error_string()</code> and <code>ERR_reason_error_string()</code> return the strings,
|
||
|
and <strong>NULL</strong> if none is registered for the error code.</p>
|
||
|
<p><code>ERR_func_error_string()</code> returns NULL.</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="see_also">SEE ALSO</a></h1>
|
||
|
<p><em>ERR_get_error(3)</em>,
|
||
|
<em>ERR_print_errors(3)</em></p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="history">HISTORY</a></h1>
|
||
|
<p><code>ERR_func_error_string()</code> became deprecated in OpenSSL 3.0.</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="copyright">COPYRIGHT</a></h1>
|
||
|
<p>Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.</p>
|
||
|
<p>Licensed under the Apache License 2.0 (the "License"). You may not use
|
||
|
this file except in compliance with the License. You can obtain a copy
|
||
|
in the file LICENSE in the source distribution or at
|
||
|
<a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|