summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-03-17 18:52:42 +0000
committerschwarze <>2018-03-17 18:52:42 +0000
commit1df6e36c9d7eff0320ef36b1b8f08614c168f15f (patch)
treeb78b9cffdc705671413f909986fcefbd779b7c4b
parent6f8df959b6c5413c67db6629ba3ad7806ac55138 (diff)
downloadopenbsd-1df6e36c9d7eff0320ef36b1b8f08614c168f15f.tar.gz
openbsd-1df6e36c9d7eff0320ef36b1b8f08614c168f15f.tar.bz2
openbsd-1df6e36c9d7eff0320ef36b1b8f08614c168f15f.zip
In crypto.h rev. 1.43 and ssl.h rev. 1.153 2018/03/17 16:20:01, beck@
provided OPENSSL_init_crypto(3) and OPENSSL_init_ssl(3). Write the documentation from scratch because the text OpenSSL provides is full of bloat.
-rw-r--r--src/lib/libcrypto/man/CONF_modules_load_file.37
-rw-r--r--src/lib/libcrypto/man/Makefile3
-rw-r--r--src/lib/libcrypto/man/OPENSSL_config.35
-rw-r--r--src/lib/libcrypto/man/OPENSSL_init_crypto.377
-rw-r--r--src/lib/libssl/man/Makefile3
-rw-r--r--src/lib/libssl/man/OPENSSL_init_ssl.360
6 files changed, 148 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/CONF_modules_load_file.3 b/src/lib/libcrypto/man/CONF_modules_load_file.3
index 620787b4f1..c3cc89adf3 100644
--- a/src/lib/libcrypto/man/CONF_modules_load_file.3
+++ b/src/lib/libcrypto/man/CONF_modules_load_file.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: CONF_modules_load_file.3,v 1.5 2016/12/11 18:06:09 schwarze Exp $ 1.\" $OpenBSD: CONF_modules_load_file.3,v 1.6 2018/03/17 18:52:42 schwarze Exp $
2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -48,7 +48,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: December 11 2016 $ 51.Dd $Mdocdate: March 17 2018 $
52.Dt CONF_MODULES_LOAD_FILE 3 52.Dt CONF_MODULES_LOAD_FILE 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -219,7 +219,8 @@ if (fp == NULL) {
219.Sh SEE ALSO 219.Sh SEE ALSO
220.Xr CONF_modules_free 3 , 220.Xr CONF_modules_free 3 ,
221.Xr ERR 3 , 221.Xr ERR 3 ,
222.Xr OPENSSL_config 3 222.Xr OPENSSL_config 3 ,
223.Xr OPENSSL_init_crypto 3
223.Sh HISTORY 224.Sh HISTORY
224.Fn CONF_modules_load_file 225.Fn CONF_modules_load_file
225and 226and
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 58b3cc2847..8d2e242f31 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.136 2018/03/01 19:20:09 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.137 2018/03/17 18:52:42 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -155,6 +155,7 @@ MAN= \
155 OPENSSL_VERSION_NUMBER.3 \ 155 OPENSSL_VERSION_NUMBER.3 \
156 OPENSSL_cleanse.3 \ 156 OPENSSL_cleanse.3 \
157 OPENSSL_config.3 \ 157 OPENSSL_config.3 \
158 OPENSSL_init_crypto.3 \
158 OPENSSL_load_builtin_modules.3 \ 159 OPENSSL_load_builtin_modules.3 \
159 OPENSSL_malloc.3 \ 160 OPENSSL_malloc.3 \
160 OPENSSL_sk_new.3 \ 161 OPENSSL_sk_new.3 \
diff --git a/src/lib/libcrypto/man/OPENSSL_config.3 b/src/lib/libcrypto/man/OPENSSL_config.3
index a5fd5a8d36..3aa1944dab 100644
--- a/src/lib/libcrypto/man/OPENSSL_config.3
+++ b/src/lib/libcrypto/man/OPENSSL_config.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: OPENSSL_config.3,v 1.6 2017/07/06 15:42:04 schwarze Exp $ 1.\" $OpenBSD: OPENSSL_config.3,v 1.7 2018/03/17 18:52:42 schwarze Exp $
2.\" OpenSSL ab6577a4 May 14 21:07:51 2014 +0100 2.\" OpenSSL ab6577a4 May 14 21:07:51 2014 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -48,7 +48,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: July 6 2017 $ 51.Dd $Mdocdate: March 17 2018 $
52.Dt OPENSSL_CONFIG 3 52.Dt OPENSSL_CONFIG 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -147,6 +147,7 @@ standard configuration file
147.Sh SEE ALSO 147.Sh SEE ALSO
148.Xr CONF_modules_free 3 , 148.Xr CONF_modules_free 3 ,
149.Xr CONF_modules_load 3 , 149.Xr CONF_modules_load 3 ,
150.Xr OPENSSL_init_crypto 3 ,
150.Xr openssl.cnf 5 151.Xr openssl.cnf 5
151.Sh HISTORY 152.Sh HISTORY
152.Fn OPENSSL_config 153.Fn OPENSSL_config
diff --git a/src/lib/libcrypto/man/OPENSSL_init_crypto.3 b/src/lib/libcrypto/man/OPENSSL_init_crypto.3
new file mode 100644
index 0000000000..27c60561fe
--- /dev/null
+++ b/src/lib/libcrypto/man/OPENSSL_init_crypto.3
@@ -0,0 +1,77 @@
1.\" $OpenBSD: OPENSSL_init_crypto.3,v 1.1 2018/03/17 18:52:42 schwarze Exp $
2.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
3.\"
4.\" Permission to use, copy, modify, and distribute this software for any
5.\" purpose with or without fee is hereby granted, provided that the above
6.\" copyright notice and this permission notice appear in all copies.
7.\"
8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15.\"
16.Dd $Mdocdate: March 17 2018 $
17.Dt OPENSSL_INIT_CRYPTO 3
18.Os
19.Sh NAME
20.Nm OPENSSL_init_crypto
21.Nd initialise the crypto library
22.Sh SYNOPSIS
23.In openssl/crypto.h
24.Ft int
25.Fo OPENSSL_init_crypto
26.Fa "uint64_t options"
27.Fa "const void *dummy"
28.Fc
29.Sh DESCRIPTION
30If
31.Fn OPENSSL_init_crypto
32is called before any other crypto or ssl functions, the crypto
33library is initialised by allocating various internal resources.
34Unless the
35.Dv OPENSSL_INIT_NO_LOAD_CONFIG
36bit is set in the
37.Fa options
38argument, the default
39.Xr openssl.cnf 5
40configuration file is also loaded as documented in
41.Xr OPENSSL_config 3 .
42.Pp
43The other
44.Fa options
45flags defined by OpenSSL are all ignored by LibreSSL.
46The
47.Fa dummy
48argument has no effect.
49.Pp
50Calling this function is almost never useful because it is internally
51called with an
52.Fa options
53argument of 0 by those functions in the crypto and ssl libraries
54that require it.
55It is safest to assume that any function may do so.
56.Pp
57If this function is called more than once, none of the calls except
58the first one have any effect.
59.Sh RETURN VALUES
60.Fn OPENSSL_init_crypto
61is intended to return 1 on success or 0 on error.
62.Sh SEE ALSO
63.Xr CONF_modules_load_file 3 ,
64.Xr OPENSSL_init_ssl 3 ,
65.Xr openssl.cnf 5
66.Sh HISTORY
67.Fn OPENSSL_init_crypto
68first appeared in OpenSSL 1.1.0.
69.Sh BUGS
70.Fn OPENSSL_init_crypto
71silently ignores almost all kinds of errors.
72In particular, if memory allocation fails, initialisation is likely
73to remain incomplete, the library may be in an inconsistent internal
74state, but the return value will usually indicate success anyway.
75There is no way for the application program to find out whether
76library initialisation is actually complete, nor to get back to a
77consistent state if it isn't.
diff --git a/src/lib/libssl/man/Makefile b/src/lib/libssl/man/Makefile
index d5141811e7..375e5fba2b 100644
--- a/src/lib/libssl/man/Makefile
+++ b/src/lib/libssl/man/Makefile
@@ -1,9 +1,10 @@
1# $OpenBSD: Makefile,v 1.64 2018/03/17 18:19:49 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.65 2018/03/17 18:52:42 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
5MAN = BIO_f_ssl.3 \ 5MAN = BIO_f_ssl.3 \
6 DTLSv1_listen.3 \ 6 DTLSv1_listen.3 \
7 OPENSSL_init_ssl.3 \
7 PEM_read_SSL_SESSION.3 \ 8 PEM_read_SSL_SESSION.3 \
8 SSL_CIPHER_get_name.3 \ 9 SSL_CIPHER_get_name.3 \
9 SSL_COMP_add_compression_method.3 \ 10 SSL_COMP_add_compression_method.3 \
diff --git a/src/lib/libssl/man/OPENSSL_init_ssl.3 b/src/lib/libssl/man/OPENSSL_init_ssl.3
new file mode 100644
index 0000000000..ae356c9bf5
--- /dev/null
+++ b/src/lib/libssl/man/OPENSSL_init_ssl.3
@@ -0,0 +1,60 @@
1.\" $OpenBSD: OPENSSL_init_ssl.3,v 1.1 2018/03/17 18:52:42 schwarze Exp $
2.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
3.\"
4.\" Permission to use, copy, modify, and distribute this software for any
5.\" purpose with or without fee is hereby granted, provided that the above
6.\" copyright notice and this permission notice appear in all copies.
7.\"
8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15.\"
16.Dd $Mdocdate: March 17 2018 $
17.Dt OPENSSL_INIT_SSL 3
18.Os
19.Sh NAME
20.Nm OPENSSL_init_ssl
21.Nd initialise the crypto and ssl libraries
22.Sh SYNOPSIS
23.In openssl/ssl.h
24.Ft int
25.Fo OPENSSL_init_ssl
26.Fa "uint64_t options"
27.Fa "const void *dummy"
28.Fc
29.Sh DESCRIPTION
30.Fn OPENSSL_init_ssl
31calls
32.Xr OPENSSL_init_crypto 3
33and also allocates various resources used internally by the ssl library.
34.Pp
35Calling it is never useful because it is automatically called
36internally when needed.
37.Pp
38The
39.Fa options
40argument is passed on to
41.Xr OPENSSL_init_crypto 3
42and the
43.Fa dummy
44argument is ignored.
45.Pp
46If this function is called more than once,
47none of the calls except the first one have any effect.
48.Sh RETURN VALUES
49.Fn OPENSSL_init_ssl
50is intended to return 1 on success or 0 on error.
51.Sh SEE ALSO
52.Xr CONF_modules_load_file 3 ,
53.Xr OPENSSL_init_crypto 3
54.Sh HISTORY
55.Fn OPENSSL_init_ssl
56first appeared in OpenSSL 1.1.0.
57.Sh BUGS
58.Fn OPENSSL_init_ssl
59silently ignores even more configuration failures than
60.Xr OPENSSL_init_crypto 3 .