summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libcrypto/man/ERR_load_crypto_strings.358
1 files changed, 47 insertions, 11 deletions
diff --git a/lib/libcrypto/man/ERR_load_crypto_strings.3 b/lib/libcrypto/man/ERR_load_crypto_strings.3
index 213fb662221..812258f60af 100644
--- a/lib/libcrypto/man/ERR_load_crypto_strings.3
+++ b/lib/libcrypto/man/ERR_load_crypto_strings.3
@@ -1,7 +1,24 @@
-.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.4 2016/11/23 17:59:29 schwarze Exp $
+.\" $OpenBSD: ERR_load_crypto_strings.3,v 1.5 2017/01/26 04:37:08 schwarze Exp $
.\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
.\"
-.\" This file was written by Ulf Moeller <ulf@openssl.org>.
+.\" This file is a derived work.
+.\" The changes are covered by the following Copyright and license:
+.\"
+.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" The original file was written by Ulf Moeller <ulf@openssl.org>.
.\" Copyright (c) 2000 The OpenSSL Project. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -48,13 +65,14 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: November 23 2016 $
+.Dd $Mdocdate: January 26 2017 $
.Dt ERR_LOAD_CRYPTO_STRINGS 3
.Os
.Sh NAME
.Nm ERR_load_crypto_strings ,
-.Nm SSL_load_error_strings ,
-.Nm ERR_free_strings
+.Nm ERR_free_strings ,
+.Nm ERR_load_BN_strings ,
+.Nm SSL_load_error_strings
.Nd load and free OpenSSL error strings
.Sh SYNOPSIS
.In openssl/err.h
@@ -62,6 +80,9 @@
.Fn ERR_load_crypto_strings void
.Ft void
.Fn ERR_free_strings void
+.In openssl/bn.h
+.Ft void
+.Fn ERR_load_BN_strings void
.In openssl/ssl.h
.Ft void
.Fn SSL_load_error_strings void
@@ -75,18 +96,25 @@ does the same, but also registers the
.Xr ssl 3
error strings.
.Pp
+.Fn ERR_load_BN_strings
+only registers the error strings for the
+.Vt BIGNUM
+part of the library, i.e. the functions documented in
+.Xr BN_new 3
+and in the manual pages referenced from there.
+That may be useful if no other parts of the crypto library
+are used by the program.
+Similar functions exist for other parts of the crypto library,
+but they are not yet documented.
+.Pp
+If the error strings were already loaded before, no action occurs.
+.Pp
One of these functions should be called before generating textual error
messages.
However, this is not required when memory usage is an issue.
.Pp
.Fn ERR_free_strings
frees all previously loaded error strings.
-.Sh RETURN VALUES
-.Fn ERR_load_crypto_strings ,
-.Fn SSL_load_error_strings ,
-and
-.Fn ERR_free_strings
-return no values.
.Sh SEE ALSO
.Xr ERR 3 ,
.Xr ERR_error_string 3
@@ -96,3 +124,11 @@ return no values.
and
.Fn ERR_free_strings
are available in all versions of SSLeay and OpenSSL.
+.Sh BUGS
+Even though the error strings are already compiled into the object
+code of the library as static strings, these functions store them
+again using dynamically allocated memory on the heap.
+That may fail if insufficient memory is available,
+but these functions do not report such errors.
+Instead, they fail silently, possibly having registered none or only
+a part of the strings requested.