diff options
Diffstat (limited to 'src/lib/libcrypto/man/PEM_read.3')
| -rw-r--r-- | src/lib/libcrypto/man/PEM_read.3 | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/lib/libcrypto/man/PEM_read.3 b/src/lib/libcrypto/man/PEM_read.3 index 48418b9f4e..1493d54fc4 100644 --- a/src/lib/libcrypto/man/PEM_read.3 +++ b/src/lib/libcrypto/man/PEM_read.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: PEM_read.3,v 1.14 2022/01/15 23:38:50 jsg Exp $ | 1 | .\" $OpenBSD: PEM_read.3,v 1.15 2023/09/18 15:26:46 schwarze Exp $ |
| 2 | .\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 | 2 | .\" full merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. |
| @@ -66,7 +66,7 @@ | |||
| 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 68 | .\" | 68 | .\" |
| 69 | .Dd $Mdocdate: January 15 2022 $ | 69 | .Dd $Mdocdate: September 18 2023 $ |
| 70 | .Dt PEM_READ 3 | 70 | .Dt PEM_READ 3 |
| 71 | .Os | 71 | .Os |
| 72 | .Sh NAME | 72 | .Sh NAME |
| @@ -124,21 +124,21 @@ | |||
| 124 | .Fa "unsigned char *data" | 124 | .Fa "unsigned char *data" |
| 125 | .Fa "long *len" | 125 | .Fa "long *len" |
| 126 | .Fa "pem_password_cb *cb" | 126 | .Fa "pem_password_cb *cb" |
| 127 | .Fa "void *u" | 127 | .Fa "void *userdata" |
| 128 | .Fc | 128 | .Fc |
| 129 | .Ft int | 129 | .Ft int |
| 130 | .Fo PEM_def_callback | 130 | .Fo PEM_def_callback |
| 131 | .Fa "char *password" | 131 | .Fa "char *password" |
| 132 | .Fa "int size" | 132 | .Fa "int size" |
| 133 | .Fa "int verify" | 133 | .Fa "int verify" |
| 134 | .Fa "void *u" | 134 | .Fa "void *userdata" |
| 135 | .Fc | 135 | .Fc |
| 136 | .Ft typedef int | 136 | .Ft typedef int |
| 137 | .Fo pem_password_cb | 137 | .Fo pem_password_cb |
| 138 | .Fa "char *password" | 138 | .Fa "char *password" |
| 139 | .Fa "int size" | 139 | .Fa "int size" |
| 140 | .Fa "int verify" | 140 | .Fa "int verify" |
| 141 | .Fa "void *u" | 141 | .Fa "void *userdata" |
| 142 | .Fc | 142 | .Fc |
| 143 | .Sh DESCRIPTION | 143 | .Sh DESCRIPTION |
| 144 | These functions read and write PEM-encoded objects, using the PEM type | 144 | These functions read and write PEM-encoded objects, using the PEM type |
| @@ -289,16 +289,22 @@ The | |||
| 289 | buffer needs to be at least | 289 | buffer needs to be at least |
| 290 | .Fa size | 290 | .Fa size |
| 291 | bytes long. | 291 | bytes long. |
| 292 | Unless | ||
| 293 | .Fa userdata | ||
| 294 | is | ||
| 295 | .Dv NULL , | ||
| 292 | .Fn PEM_def_callback | 296 | .Fn PEM_def_callback |
| 293 | silently truncates the NUL-terminated byte string | 297 | ignores the |
| 294 | .Fa u | 298 | .Fa verify |
| 295 | to at most | 299 | argument and copies the NUL-terminated byte string |
| 296 | .Fa num | 300 | .Fa userdata |
| 297 | bytes and copies it into | 301 | to |
| 298 | .Fa password | 302 | .Fa password |
| 299 | without a terminating NUL byte. | 303 | without a terminating NUL byte, silently truncating the copy to at most |
| 304 | .Fa size | ||
| 305 | bytes. | ||
| 300 | If | 306 | If |
| 301 | .Fa u | 307 | .Fa userdata |
| 302 | is | 308 | is |
| 303 | .Dv NULL , | 309 | .Dv NULL , |
| 304 | .Fn PEM_def_callback | 310 | .Fn PEM_def_callback |
| @@ -317,7 +323,7 @@ bytes are accepted from the user and copied into the byte string buffer | |||
| 317 | A callback function | 323 | A callback function |
| 318 | .Fa cb | 324 | .Fa cb |
| 319 | supplied by the application may use | 325 | supplied by the application may use |
| 320 | .Fa u | 326 | .Fa userdata |
| 321 | for a different purpose than | 327 | for a different purpose than |
| 322 | .Fn PEM_def_callback | 328 | .Fn PEM_def_callback |
| 323 | does, e.g., as auxiliary data to use while acquiring the password. | 329 | does, e.g., as auxiliary data to use while acquiring the password. |
| @@ -328,7 +334,7 @@ flag is non-zero, the user is prompted twice for the password to | |||
| 328 | make typos less likely and it is checked that both inputs agree. | 334 | make typos less likely and it is checked that both inputs agree. |
| 329 | This flag is not set by | 335 | This flag is not set by |
| 330 | .Fn PEM_do_header | 336 | .Fn PEM_do_header |
| 331 | nor by other read functions. | 337 | nor by other read functions, but it is typically set by write functions. |
| 332 | .Pp | 338 | .Pp |
| 333 | If the data is a priori known to not be encrypted, then neither | 339 | If the data is a priori known to not be encrypted, then neither |
| 334 | .Fn PEM_get_EVP_CIPHER_INFO | 340 | .Fn PEM_get_EVP_CIPHER_INFO |
| @@ -366,7 +372,7 @@ or a negative value on failure, and | |||
| 366 | .Fa cb | 372 | .Fa cb |
| 367 | is expected to behave in the same way. | 373 | is expected to behave in the same way. |
| 368 | If | 374 | If |
| 369 | .Fa u | 375 | .Fa userdata |
| 370 | is | 376 | is |
| 371 | .Dv NULL , | 377 | .Dv NULL , |
| 372 | .Fn PEM_def_callback | 378 | .Fn PEM_def_callback |
