diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/PKCS7_new.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/PKCS7_set_content.3 | 119 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/PKCS7_set_type.3 | 5 |
4 files changed, 127 insertions, 5 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 5cb80ee5c3..1394012e9c 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.161 2020/05/16 00:11:55 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.162 2020/05/20 11:40:26 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -217,6 +217,7 @@ MAN= \ | |||
| 217 | PKCS7_decrypt.3 \ | 217 | PKCS7_decrypt.3 \ |
| 218 | PKCS7_encrypt.3 \ | 218 | PKCS7_encrypt.3 \ |
| 219 | PKCS7_new.3 \ | 219 | PKCS7_new.3 \ |
| 220 | PKCS7_set_content.3 \ | ||
| 220 | PKCS7_set_type.3 \ | 221 | PKCS7_set_type.3 \ |
| 221 | PKCS7_sign.3 \ | 222 | PKCS7_sign.3 \ |
| 222 | PKCS7_sign_add_signer.3 \ | 223 | PKCS7_sign_add_signer.3 \ |
diff --git a/src/lib/libcrypto/man/PKCS7_new.3 b/src/lib/libcrypto/man/PKCS7_new.3 index 324c96cfc9..56a8b566ba 100644 --- a/src/lib/libcrypto/man/PKCS7_new.3 +++ b/src/lib/libcrypto/man/PKCS7_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: PKCS7_new.3,v 1.7 2020/05/16 00:11:55 schwarze Exp $ | 1 | .\" $OpenBSD: PKCS7_new.3,v 1.8 2020/05/20 11:40:26 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -14,7 +14,7 @@ | |||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | .\" | 16 | .\" |
| 17 | .Dd $Mdocdate: May 16 2020 $ | 17 | .Dd $Mdocdate: May 20 2020 $ |
| 18 | .Dt PKCS7_NEW 3 | 18 | .Dt PKCS7_NEW 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| @@ -249,6 +249,7 @@ frees | |||
| 249 | .Xr PKCS7_decrypt 3 , | 249 | .Xr PKCS7_decrypt 3 , |
| 250 | .Xr PKCS7_encrypt 3 , | 250 | .Xr PKCS7_encrypt 3 , |
| 251 | .Xr PKCS7_ISSUER_AND_SERIAL_digest 3 , | 251 | .Xr PKCS7_ISSUER_AND_SERIAL_digest 3 , |
| 252 | .Xr PKCS7_set_content 3 , | ||
| 252 | .Xr PKCS7_set_type 3 , | 253 | .Xr PKCS7_set_type 3 , |
| 253 | .Xr PKCS7_sign 3 , | 254 | .Xr PKCS7_sign 3 , |
| 254 | .Xr PKCS7_sign_add_signer 3 , | 255 | .Xr PKCS7_sign_add_signer 3 , |
diff --git a/src/lib/libcrypto/man/PKCS7_set_content.3 b/src/lib/libcrypto/man/PKCS7_set_content.3 new file mode 100644 index 0000000000..1f77a8042b --- /dev/null +++ b/src/lib/libcrypto/man/PKCS7_set_content.3 | |||
| @@ -0,0 +1,119 @@ | |||
| 1 | .\" $OpenBSD: PKCS7_set_content.3,v 1.1 2020/05/20 11:40:26 schwarze Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
| 4 | .\" | ||
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 7 | .\" copyright notice and this permission notice appear in all copies. | ||
| 8 | .\" | ||
| 9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | .\" | ||
| 17 | .Dd $Mdocdate: May 20 2020 $ | ||
| 18 | .Dt PKCS7_SET_CONTENT 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm PKCS7_set_content , | ||
| 22 | .Nm PKCS7_content_new | ||
| 23 | .Nd set the nested contentInfo in a PKCS#7 structure | ||
| 24 | .Sh SYNOPSIS | ||
| 25 | .In openssl/pkcs7.h | ||
| 26 | .Ft int | ||
| 27 | .Fo PKCS7_set_content | ||
| 28 | .Fa "PKCS7 *outer" | ||
| 29 | .Fa "PKCS7 *inner" | ||
| 30 | .Fc | ||
| 31 | .Ft int | ||
| 32 | .Fo PKCS7_content_new | ||
| 33 | .Fa "PKCS7 *outer" | ||
| 34 | .Fa "int inner_type" | ||
| 35 | .Fc | ||
| 36 | .Sh DESCRIPTION | ||
| 37 | If the | ||
| 38 | .Fa contentType | ||
| 39 | of the | ||
| 40 | .Fa outer | ||
| 41 | PKCS7 structure is | ||
| 42 | .Vt SignedData | ||
| 43 | or | ||
| 44 | .Vt DigestedData , | ||
| 45 | .Fn PKCS7_set_content | ||
| 46 | sets the | ||
| 47 | .Fa contentInfo | ||
| 48 | field of the | ||
| 49 | .Fa content | ||
| 50 | field of | ||
| 51 | .Fa outer | ||
| 52 | to | ||
| 53 | .Fa inner , | ||
| 54 | without copying | ||
| 55 | .Fa inner . | ||
| 56 | If there was previous | ||
| 57 | .Fa contentInfo , | ||
| 58 | it is freed rather than overwritten. | ||
| 59 | The rest of the internal state of | ||
| 60 | .Fa outer | ||
| 61 | and of its | ||
| 62 | .Fa content | ||
| 63 | remains unchanged. | ||
| 64 | .Pp | ||
| 65 | .Fn PKCS7_content_new | ||
| 66 | is similar except that it first allocates and initializes a new, empty | ||
| 67 | .Fa inner | ||
| 68 | object of the given | ||
| 69 | .Fa inner_type | ||
| 70 | using | ||
| 71 | .Xr PKCS7_new 3 | ||
| 72 | and | ||
| 73 | .Xr PKCS7_set_type 3 . | ||
| 74 | The | ||
| 75 | .Fa inner_type | ||
| 76 | can be any of the NIDs listed in the | ||
| 77 | .Xr PKCS7_set_type 3 | ||
| 78 | manual. | ||
| 79 | .Sh RETURN VALUES | ||
| 80 | These functions return 1 on success or 0 on failure. | ||
| 81 | They fail if the | ||
| 82 | .Fa contentType | ||
| 83 | of | ||
| 84 | .Fa outer | ||
| 85 | is unsupported. | ||
| 86 | .Fn PKCS7_content_new | ||
| 87 | can also fail when memory is exhausted. | ||
| 88 | In case of failure, | ||
| 89 | .Fa outer | ||
| 90 | remains unchanged. | ||
| 91 | .Sh SEE ALSO | ||
| 92 | .Xr PKCS7_new 3 , | ||
| 93 | .Xr PKCS7_set_type 3 , | ||
| 94 | .Xr PKCS7_sign 3 | ||
| 95 | .Sh STANDARDS | ||
| 96 | RFC 2315: PKCS #7: Cryptographic Message Syntax Version 1.5 | ||
| 97 | .Bl -bullet -compact -offset 1n -width 1n | ||
| 98 | .It | ||
| 99 | Section 7. General syntax | ||
| 100 | .It | ||
| 101 | Section 9. Signed-data content type | ||
| 102 | .It | ||
| 103 | Section 12.\& Digested-data content type | ||
| 104 | .El | ||
| 105 | .Sh HISTORY | ||
| 106 | These functions first appeared in SSLeay 0.8.1 | ||
| 107 | and have been available since | ||
| 108 | .Ox 2.4 . | ||
| 109 | .Sh CAVEATS | ||
| 110 | Despite the function names, these functions do not set the | ||
| 111 | .Fa content | ||
| 112 | field of | ||
| 113 | .Fa outer , | ||
| 114 | but only the | ||
| 115 | .Fa contentInfo | ||
| 116 | field inside it. | ||
| 117 | The rest of the | ||
| 118 | .Fa content | ||
| 119 | remains unchanged. | ||
diff --git a/src/lib/libcrypto/man/PKCS7_set_type.3 b/src/lib/libcrypto/man/PKCS7_set_type.3 index a666b866ff..f414b128a2 100644 --- a/src/lib/libcrypto/man/PKCS7_set_type.3 +++ b/src/lib/libcrypto/man/PKCS7_set_type.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: PKCS7_set_type.3,v 1.1 2020/05/16 00:11:55 schwarze Exp $ | 1 | .\" $OpenBSD: PKCS7_set_type.3,v 1.2 2020/05/20 11:40:26 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -14,7 +14,7 @@ | |||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | .\" | 16 | .\" |
| 17 | .Dd $Mdocdate: May 16 2020 $ | 17 | .Dd $Mdocdate: May 20 2020 $ |
| 18 | .Dt PKCS7_SET_TYPE 3 | 18 | .Dt PKCS7_SET_TYPE 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| @@ -99,6 +99,7 @@ does no error handling at all and always returns 1. | |||
| 99 | .Xr ASN1_TYPE_new 3 , | 99 | .Xr ASN1_TYPE_new 3 , |
| 100 | .Xr PKCS7_encrypt 3 , | 100 | .Xr PKCS7_encrypt 3 , |
| 101 | .Xr PKCS7_new 3 , | 101 | .Xr PKCS7_new 3 , |
| 102 | .Xr PKCS7_set_content 3 , | ||
| 102 | .Xr PKCS7_sign 3 | 103 | .Xr PKCS7_sign 3 |
| 103 | .Sh HISTORY | 104 | .Sh HISTORY |
| 104 | The function | 105 | The function |
