diff options
| author | deraadt <> | 2016-11-29 18:16:09 +0000 |
|---|---|---|
| committer | deraadt <> | 2016-11-29 18:16:09 +0000 |
| commit | d36c53cde950d0fc4e1cc504b716d94a668c3b48 (patch) | |
| tree | 5829c82f8142a6fa1bf9040a6070d85ec5d71fc3 /src/lib/libcrypto/man/OPENSSL_malloc.3 | |
| parent | 469593daceeec1312ea38c596f80e1af0f052ff2 (diff) | |
| download | openbsd-d36c53cde950d0fc4e1cc504b716d94a668c3b48.tar.gz openbsd-d36c53cde950d0fc4e1cc504b716d94a668c3b48.tar.bz2 openbsd-d36c53cde950d0fc4e1cc504b716d94a668c3b48.zip | |
seperate these descriptions into seperate files to reduce confusion.
discussed with jsing
ok schwarze
Diffstat (limited to 'src/lib/libcrypto/man/OPENSSL_malloc.3')
| -rw-r--r-- | src/lib/libcrypto/man/OPENSSL_malloc.3 | 100 |
1 files changed, 8 insertions, 92 deletions
diff --git a/src/lib/libcrypto/man/OPENSSL_malloc.3 b/src/lib/libcrypto/man/OPENSSL_malloc.3 index 71313ce7c8..0b762f66b6 100644 --- a/src/lib/libcrypto/man/OPENSSL_malloc.3 +++ b/src/lib/libcrypto/man/OPENSSL_malloc.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: OPENSSL_malloc.3,v 1.2 2016/11/29 07:29:52 jmc Exp $ | 1 | .\" $OpenBSD: OPENSSL_malloc.3,v 1.3 2016/11/29 18:16:09 deraadt Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -22,16 +22,10 @@ | |||
| 22 | .Nm OPENSSL_realloc , | 22 | .Nm OPENSSL_realloc , |
| 23 | .Nm OPENSSL_free , | 23 | .Nm OPENSSL_free , |
| 24 | .Nm OPENSSL_strdup , | 24 | .Nm OPENSSL_strdup , |
| 25 | .Nm OPENSSL_cleanse , | ||
| 26 | .Nm CRYPTO_malloc , | 25 | .Nm CRYPTO_malloc , |
| 27 | .Nm CRYPTO_realloc , | 26 | .Nm CRYPTO_realloc , |
| 28 | .Nm CRYPTO_free , | 27 | .Nm CRYPTO_free , |
| 29 | .Nm CRYPTO_strdup , | 28 | .Nm CRYPTO_strdup , |
| 30 | .Nm CRYPTO_get_mem_functions , | ||
| 31 | .Nm CRYPTO_set_mem_functions , | ||
| 32 | .Nm CRYPTO_mem_ctrl , | ||
| 33 | .Nm CRYPTO_mem_leaks , | ||
| 34 | .Nm CRYPTO_mem_leaks_fp | ||
| 35 | .Nd legacy OpenSSL memory allocation wrappers | 29 | .Nd legacy OpenSSL memory allocation wrappers |
| 36 | .Sh SYNOPSIS | 30 | .Sh SYNOPSIS |
| 37 | .In openssl/crypto.h | 31 | .In openssl/crypto.h |
| @@ -52,11 +46,6 @@ | |||
| 52 | .Fo OPENSSL_strdup | 46 | .Fo OPENSSL_strdup |
| 53 | .Fa "const char *str" | 47 | .Fa "const char *str" |
| 54 | .Fc | 48 | .Fc |
| 55 | .Ft void | ||
| 56 | .Fo OPENSSL_cleanse | ||
| 57 | .Fa "void *ptr" | ||
| 58 | .Fa "size_t len" | ||
| 59 | .Fc | ||
| 60 | .Ft void * | 49 | .Ft void * |
| 61 | .Fo CRYPTO_malloc | 50 | .Fo CRYPTO_malloc |
| 62 | .Fa "size_t num" | 51 | .Fa "size_t num" |
| @@ -82,91 +71,18 @@ | |||
| 82 | .Fa "const char *file" | 71 | .Fa "const char *file" |
| 83 | .Fa "int line" | 72 | .Fa "int line" |
| 84 | .Fc | 73 | .Fc |
| 85 | .Ft void | ||
| 86 | .Fo CRYPTO_get_mem_functions | ||
| 87 | .Fa "void *(**m)(size_t)" | ||
| 88 | .Fa "void *(**r)(void *, size_t)" | ||
| 89 | .Fa "void (**f)(void *)" | ||
| 90 | .Fc | ||
| 91 | .Ft int | ||
| 92 | .Fo CRYPTO_set_mem_functions | ||
| 93 | .Fa "void *(*m)(size_t)" | ||
| 94 | .Fa "void *(*r)(void *, size_t)" | ||
| 95 | .Fa "void (*f)(void *)" | ||
| 96 | .Fc | ||
| 97 | .Ft int | ||
| 98 | .Fo CRYPTO_mem_ctrl | ||
| 99 | .Fa "int mode" | ||
| 100 | .Fc | ||
| 101 | .Ft void | ||
| 102 | .Fo CRYPTO_mem_leaks | ||
| 103 | .Fa "BIO *b" | ||
| 104 | .Fc | ||
| 105 | .Ft void | ||
| 106 | .Fo CRYPTO_mem_leaks_fp | ||
| 107 | .Fa "FILE *fp" | ||
| 108 | .Fc | ||
| 109 | .Sh DESCRIPTION | 74 | .Sh DESCRIPTION |
| 110 | Do not use any of the interfaces documented here. | 75 | Do not use any of the interfaces documented here in new code. |
| 111 | They are provided purely for compatibility with legacy application code. | 76 | They are provided purely for compatibility with legacy application code. |
| 112 | .Pp | 77 | .Pp |
| 113 | .Fn OPENSSL_malloc , | 78 | All 8 of these functions are wrappers around the corresponding |
| 114 | .Fn OPENSSL_realloc , | 79 | standard |
| 115 | .Fn OPENSSL_free , | ||
| 116 | and | ||
| 117 | .Fn OPENSSL_strdup | ||
| 118 | have the same semantics as | ||
| 119 | .Xr malloc 3 , | ||
| 120 | .Xr realloc 3 , | ||
| 121 | .Xr free 3 , | ||
| 122 | and | ||
| 123 | .Xr strdup 3 . | ||
| 124 | They are wrapper macros around | ||
| 125 | .Fn CRYPTO_malloc , | ||
| 126 | .Fn CRYPTO_realloc , | ||
| 127 | .Fn CRYPTO_free , | ||
| 128 | and | ||
| 129 | .Fn CRYPTO_strdup , | ||
| 130 | which in turn are wrapper functions around | ||
| 131 | .Xr malloc 3 , | 80 | .Xr malloc 3 , |
| 132 | .Xr realloc 3 , | 81 | .Xr realloc 3 , |
| 133 | .Xr free 3 , | 82 | .Xr free 3 , |
| 134 | and | 83 | and |
| 135 | .Xr strdup 3 . | 84 | .Xr strdup 3 |
| 136 | .Pp | 85 | functions. |
| 137 | .Fn OPENSSL_cleanse | ||
| 138 | has the same semantics as and is a wrapper around | ||
| 139 | .Xr explicit_bzero 3 . | ||
| 140 | .Pp | ||
| 141 | .Fn CRYPTO_get_mem_functions | ||
| 142 | assigns pointers to the C library functions | ||
| 143 | .Xr malloc 3 , | ||
| 144 | .Xr realloc 3 , | ||
| 145 | and | ||
| 146 | .Xr free 3 | ||
| 147 | to those of its arguments that are not | ||
| 148 | .Dv NULL . | ||
| 149 | .Pp | ||
| 150 | .Fn CRYPTO_set_mem_functions , | ||
| 151 | .Fn CRYPTO_mem_ctrl , | ||
| 152 | .Fn CRYPTO_mem_leaks , | ||
| 153 | and | ||
| 154 | .Fn CRYPTO_mem_leaks_fp | ||
| 155 | have no effect. | ||
| 156 | .Sh RETURN VALUES | 86 | .Sh RETURN VALUES |
| 157 | .Fn OPENSSL_malloc , | 87 | These functions return same type and value as the corresponding |
| 158 | .Fn OPENSSL_realloc , | 88 | standard functions. |
| 159 | .Fn CRYPTO_malloc , | ||
| 160 | .Fn CRYPTO_realloc , | ||
| 161 | and | ||
| 162 | .Fn OPENSSL_strdup | ||
| 163 | return a pointer to allocated memory or | ||
| 164 | .Dv NULL | ||
| 165 | on error. | ||
| 166 | .Pp | ||
| 167 | .Fn CRYPTO_set_mem_functions | ||
| 168 | always returns 0. | ||
| 169 | .Pp | ||
| 170 | .Fn CRYPTO_mem_ctrl | ||
| 171 | always returns | ||
| 172 | .Dv CRYPTO_MEM_CHECK_OFF . | ||
