summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-11-29 18:16:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-11-29 18:16:10 +0000
commitd388f94ec12afebbc7020e8d9099aff01a2bcb52 (patch)
tree271258472543aeae364bb6f05a0ef79b4ede542e /lib
parent2bf7423cd13794323080c6afafbb6f248bb28a14 (diff)
seperate these descriptions into seperate files to reduce confusion.
discussed with jsing ok schwarze
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/man/CRYPTO_get_mem_functions.379
-rw-r--r--lib/libcrypto/man/Makefile6
-rw-r--r--lib/libcrypto/man/OPENSSL_cleanse.337
-rw-r--r--lib/libcrypto/man/OPENSSL_malloc.3100
4 files changed, 128 insertions, 94 deletions
diff --git a/lib/libcrypto/man/CRYPTO_get_mem_functions.3 b/lib/libcrypto/man/CRYPTO_get_mem_functions.3
new file mode 100644
index 00000000000..a0bfb8a1d50
--- /dev/null
+++ b/lib/libcrypto/man/CRYPTO_get_mem_functions.3
@@ -0,0 +1,79 @@
+.\" $OpenBSD: CRYPTO_get_mem_functions.3,v 1.1 2016/11/29 18:16:09 deraadt Exp $
+.\"
+.\" Copyright (c) 2016 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.
+.\"
+.Dd $Mdocdate: November 29 2016 $
+.Dt CRYPTO_get_mem_functions 3
+.Os
+.Sh NAME
+.Nm CRYPTO_get_mem_functions ,
+.Nm CRYPTO_set_mem_functions ,
+.Nm CRYPTO_mem_ctrl ,
+.Nm CRYPTO_mem_leaks ,
+.Nm CRYPTO_mem_leaks_fp
+.Nd legacy OpenSSL memory allocation control
+.Sh SYNOPSIS
+.In openssl/crypto.h
+.Ft void
+.Fo CRYPTO_get_mem_functions
+.Fa "void *(**m)(size_t)"
+.Fa "void *(**r)(void *, size_t)"
+.Fa "void (**f)(void *)"
+.Fc
+.Ft int
+.Fo CRYPTO_set_mem_functions
+.Fa "void *(*m)(size_t)"
+.Fa "void *(*r)(void *, size_t)"
+.Fa "void (*f)(void *)"
+.Fc
+.Ft int
+.Fo CRYPTO_mem_ctrl
+.Fa "int mode"
+.Fc
+.Ft void
+.Fo CRYPTO_mem_leaks
+.Fa "BIO *b"
+.Fc
+.Ft void
+.Fo CRYPTO_mem_leaks_fp
+.Fa "FILE *fp"
+.Fc
+.Sh DESCRIPTION
+Do not use any of the interfaces documented here.
+They are provided purely for compatibility with legacy application code.
+.Pp
+.Fn CRYPTO_get_mem_functions
+assigns pointers to the C library functions
+.Xr malloc 3 ,
+.Xr realloc 3 ,
+and
+.Xr free 3
+to those of its arguments that are not
+.Dv NULL.
+.Pp
+.Fn CRYPTO_set_mem_functions ,
+.Fn CRYPTO_mem_ctrl ,
+.Fn CRYPTO_mem_leaks ,
+and
+.Fn CRYPTO_mem_leaks_fp
+have no effect.
+.Sh RETURN VALUES
+.Pp
+.Fn CRYPTO_set_mem_functions
+always returns 0.
+.Pp
+.Fn CRYPTO_mem_ctrl
+always returns
+.Dv CRYPTO_MEM_CHECK_OFF .
diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile
index afec15edbfb..f6dd178a0c1 100644
--- a/lib/libcrypto/man/Makefile
+++ b/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.60 2016/11/29 00:07:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.61 2016/11/29 18:16:09 deraadt Exp $
.include <bsd.own.mk>
@@ -57,6 +57,7 @@ MAN= \
BUF_MEM_new.3 \
CONF_modules_free.3 \
CONF_modules_load_file.3 \
+ CRYPTO_get_mem_functions.3 \
CRYPTO_set_ex_data.3 \
CRYPTO_set_locking_callback.3 \
DES_set_key.3 \
@@ -76,13 +77,13 @@ MAN= \
DSA_set_method.3 \
DSA_sign.3 \
DSA_size.3 \
+ ECDSA_SIG_new.3 \
EC_GFp_simple_method.3 \
EC_GROUP_copy.3 \
EC_GROUP_new.3 \
EC_KEY_new.3 \
EC_POINT_add.3 \
EC_POINT_new.3 \
- ECDSA_SIG_new.3 \
ERR.3 \
ERR_GET_LIB.3 \
ERR_clear_error.3 \
@@ -129,6 +130,7 @@ MAN= \
OCSP_response_status.3 \
OCSP_sendreq_new.3 \
OPENSSL_VERSION_NUMBER.3 \
+ OPENSSL_cleanse.3 \
OPENSSL_config.3 \
OPENSSL_load_builtin_modules.3 \
OPENSSL_malloc.3 \
diff --git a/lib/libcrypto/man/OPENSSL_cleanse.3 b/lib/libcrypto/man/OPENSSL_cleanse.3
new file mode 100644
index 00000000000..b8fc7acad9e
--- /dev/null
+++ b/lib/libcrypto/man/OPENSSL_cleanse.3
@@ -0,0 +1,37 @@
+.\" $OpenBSD: OPENSSL_cleanse.3,v 1.1 2016/11/29 18:16:09 deraadt Exp $
+.\"
+.\" Copyright (c) 2016 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.
+.\"
+.Dd $Mdocdate: November 29 2016 $
+.Dt OPENSSL_cleanse 3
+.Os
+.Sh NAME
+.Nm OPENSSL_cleanse
+.Nd OpenSSL memory cleaning operation
+.Sh SYNOPSIS
+.In openssl/crypto.h
+.Fc
+.Ft void
+.Fo OPENSSL_cleanse
+.Fa "void *ptr"
+.Fa "size_t len"
+.Fc
+.Sh DESCRIPTION
+Do not use any of the interfaces documented here.
+They are provided purely for compatibility with legacy application code.
+.Pp
+.Fn OPENSSL_cleanse
+has the same semantics as and is a wrapper around
+.Xr explicit_bzero 3 .
diff --git a/lib/libcrypto/man/OPENSSL_malloc.3 b/lib/libcrypto/man/OPENSSL_malloc.3
index 71313ce7c86..0b762f66b6c 100644
--- a/lib/libcrypto/man/OPENSSL_malloc.3
+++ b/lib/libcrypto/man/OPENSSL_malloc.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: OPENSSL_malloc.3,v 1.2 2016/11/29 07:29:52 jmc Exp $
+.\" $OpenBSD: OPENSSL_malloc.3,v 1.3 2016/11/29 18:16:09 deraadt Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
@@ -22,16 +22,10 @@
.Nm OPENSSL_realloc ,
.Nm OPENSSL_free ,
.Nm OPENSSL_strdup ,
-.Nm OPENSSL_cleanse ,
.Nm CRYPTO_malloc ,
.Nm CRYPTO_realloc ,
.Nm CRYPTO_free ,
.Nm CRYPTO_strdup ,
-.Nm CRYPTO_get_mem_functions ,
-.Nm CRYPTO_set_mem_functions ,
-.Nm CRYPTO_mem_ctrl ,
-.Nm CRYPTO_mem_leaks ,
-.Nm CRYPTO_mem_leaks_fp
.Nd legacy OpenSSL memory allocation wrappers
.Sh SYNOPSIS
.In openssl/crypto.h
@@ -52,11 +46,6 @@
.Fo OPENSSL_strdup
.Fa "const char *str"
.Fc
-.Ft void
-.Fo OPENSSL_cleanse
-.Fa "void *ptr"
-.Fa "size_t len"
-.Fc
.Ft void *
.Fo CRYPTO_malloc
.Fa "size_t num"
@@ -82,91 +71,18 @@
.Fa "const char *file"
.Fa "int line"
.Fc
-.Ft void
-.Fo CRYPTO_get_mem_functions
-.Fa "void *(**m)(size_t)"
-.Fa "void *(**r)(void *, size_t)"
-.Fa "void (**f)(void *)"
-.Fc
-.Ft int
-.Fo CRYPTO_set_mem_functions
-.Fa "void *(*m)(size_t)"
-.Fa "void *(*r)(void *, size_t)"
-.Fa "void (*f)(void *)"
-.Fc
-.Ft int
-.Fo CRYPTO_mem_ctrl
-.Fa "int mode"
-.Fc
-.Ft void
-.Fo CRYPTO_mem_leaks
-.Fa "BIO *b"
-.Fc
-.Ft void
-.Fo CRYPTO_mem_leaks_fp
-.Fa "FILE *fp"
-.Fc
.Sh DESCRIPTION
-Do not use any of the interfaces documented here.
+Do not use any of the interfaces documented here in new code.
They are provided purely for compatibility with legacy application code.
.Pp
-.Fn OPENSSL_malloc ,
-.Fn OPENSSL_realloc ,
-.Fn OPENSSL_free ,
-and
-.Fn OPENSSL_strdup
-have the same semantics as
-.Xr malloc 3 ,
-.Xr realloc 3 ,
-.Xr free 3 ,
-and
-.Xr strdup 3 .
-They are wrapper macros around
-.Fn CRYPTO_malloc ,
-.Fn CRYPTO_realloc ,
-.Fn CRYPTO_free ,
-and
-.Fn CRYPTO_strdup ,
-which in turn are wrapper functions around
+All 8 of these functions are wrappers around the corresponding
+standard
.Xr malloc 3 ,
.Xr realloc 3 ,
.Xr free 3 ,
and
-.Xr strdup 3 .
-.Pp
-.Fn OPENSSL_cleanse
-has the same semantics as and is a wrapper around
-.Xr explicit_bzero 3 .
-.Pp
-.Fn CRYPTO_get_mem_functions
-assigns pointers to the C library functions
-.Xr malloc 3 ,
-.Xr realloc 3 ,
-and
-.Xr free 3
-to those of its arguments that are not
-.Dv NULL .
-.Pp
-.Fn CRYPTO_set_mem_functions ,
-.Fn CRYPTO_mem_ctrl ,
-.Fn CRYPTO_mem_leaks ,
-and
-.Fn CRYPTO_mem_leaks_fp
-have no effect.
+.Xr strdup 3
+functions.
.Sh RETURN VALUES
-.Fn OPENSSL_malloc ,
-.Fn OPENSSL_realloc ,
-.Fn CRYPTO_malloc ,
-.Fn CRYPTO_realloc ,
-and
-.Fn OPENSSL_strdup
-return a pointer to allocated memory or
-.Dv NULL
-on error.
-.Pp
-.Fn CRYPTO_set_mem_functions
-always returns 0.
-.Pp
-.Fn CRYPTO_mem_ctrl
-always returns
-.Dv CRYPTO_MEM_CHECK_OFF .
+These functions return same type and value as the corresponding
+standard functions.