diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/d2i_PKCS7.3 | 314 |
2 files changed, 316 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index f260c0d4ee..7a37101828 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.102 2016/12/26 18:04:45 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.103 2016/12/26 18:52:51 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -232,6 +232,7 @@ MAN= \ | |||
| 232 | d2i_DSAPublicKey.3 \ | 232 | d2i_DSAPublicKey.3 \ |
| 233 | d2i_ECPKParameters.3 \ | 233 | d2i_ECPKParameters.3 \ |
| 234 | d2i_PKCS12.3 \ | 234 | d2i_PKCS12.3 \ |
| 235 | d2i_PKCS7.3 \ | ||
| 235 | d2i_PKCS8PrivateKey_bio.3 \ | 236 | d2i_PKCS8PrivateKey_bio.3 \ |
| 236 | d2i_PrivateKey.3 \ | 237 | d2i_PrivateKey.3 \ |
| 237 | d2i_RSAPublicKey.3 \ | 238 | d2i_RSAPublicKey.3 \ |
diff --git a/src/lib/libcrypto/man/d2i_PKCS7.3 b/src/lib/libcrypto/man/d2i_PKCS7.3 new file mode 100644 index 0000000000..a9bc4ba381 --- /dev/null +++ b/src/lib/libcrypto/man/d2i_PKCS7.3 | |||
| @@ -0,0 +1,314 @@ | |||
| 1 | .\" $OpenBSD: d2i_PKCS7.3,v 1.1 2016/12/26 18:52:51 schwarze Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2016 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: December 26 2016 $ | ||
| 18 | .Dt D2I_PKCS7 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm d2i_PKCS7 , | ||
| 22 | .Nm i2d_PKCS7 , | ||
| 23 | .Nm d2i_PKCS7_bio , | ||
| 24 | .Nm i2d_PKCS7_bio , | ||
| 25 | .Nm d2i_PKCS7_fp , | ||
| 26 | .Nm i2d_PKCS7_fp , | ||
| 27 | .Nm d2i_PKCS7_DIGEST , | ||
| 28 | .Nm i2d_PKCS7_DIGEST , | ||
| 29 | .Nm d2i_PKCS7_ENCRYPT , | ||
| 30 | .Nm i2d_PKCS7_ENCRYPT , | ||
| 31 | .Nm d2i_PKCS7_ENC_CONTENT , | ||
| 32 | .Nm i2d_PKCS7_ENC_CONTENT , | ||
| 33 | .Nm d2i_PKCS7_ENVELOPE , | ||
| 34 | .Nm i2d_PKCS7_ENVELOPE , | ||
| 35 | .Nm d2i_PKCS7_ISSUER_AND_SERIAL , | ||
| 36 | .Nm i2d_PKCS7_ISSUER_AND_SERIAL , | ||
| 37 | .Nm d2i_PKCS7_RECIP_INFO , | ||
| 38 | .Nm i2d_PKCS7_RECIP_INFO , | ||
| 39 | .Nm d2i_PKCS7_SIGNED , | ||
| 40 | .Nm i2d_PKCS7_SIGNED , | ||
| 41 | .Nm d2i_PKCS7_SIGNER_INFO , | ||
| 42 | .Nm i2d_PKCS7_SIGNER_INFO , | ||
| 43 | .Nm d2i_PKCS7_SIGN_ENVELOPE , | ||
| 44 | .Nm i2d_PKCS7_SIGN_ENVELOPE , | ||
| 45 | .\" Nm i2d_PKCS7_NDEF , | ||
| 46 | .Nd decode and encode PKCS#7 data structures | ||
| 47 | .Sh SYNOPSIS | ||
| 48 | .In openssl/pkcs7.h | ||
| 49 | .Ft PKCS7 * | ||
| 50 | .Fo d2i_PKCS7 | ||
| 51 | .Fa "PKCS7 **val_out" | ||
| 52 | .Fa "const unsigned char **der_in" | ||
| 53 | .Fa "long length" | ||
| 54 | .Fc | ||
| 55 | .Ft int | ||
| 56 | .Fo i2d_PKCS7 | ||
| 57 | .Fa "PKCS7 *val_in" | ||
| 58 | .Fa "unsigned char **der_out" | ||
| 59 | .Fc | ||
| 60 | .Ft PKCS7 * | ||
| 61 | .Fo d2i_PKCS7_bio | ||
| 62 | .Fa "BIO *in_bio" | ||
| 63 | .Fa "PKCS7 **val_out" | ||
| 64 | .Fc | ||
| 65 | .Ft int | ||
| 66 | .Fo i2d_PKCS7_bio | ||
| 67 | .Fa "BIO *out_bio" | ||
| 68 | .Fa "PKCS7 *val_in" | ||
| 69 | .Fc | ||
| 70 | .Ft PKCS7 * | ||
| 71 | .Fo d2i_PKCS7_fp | ||
| 72 | .Fa "FILE *in_fp" | ||
| 73 | .Fa "PKCS7 **val_out" | ||
| 74 | .Fc | ||
| 75 | .Ft int | ||
| 76 | .Fo i2d_PKCS7_fp | ||
| 77 | .Fa "FILE *out_fp" | ||
| 78 | .Fa "PKCS7 *val_in" | ||
| 79 | .Fc | ||
| 80 | .Ft PKCS7_DIGEST * | ||
| 81 | .Fo d2i_PKCS7_DIGEST | ||
| 82 | .Fa "PKCS7_DIGEST **val_out" | ||
| 83 | .Fa "const unsigned char **der_in" | ||
| 84 | .Fa "long length" | ||
| 85 | .Fc | ||
| 86 | .Ft int | ||
| 87 | .Fo i2d_PKCS7_DIGEST | ||
| 88 | .Fa "PKCS7_DIGEST *val_in" | ||
| 89 | .Fa "unsigned char **der_out" | ||
| 90 | .Fc | ||
| 91 | .Ft PKCS7_ENCRYPT * | ||
| 92 | .Fo d2i_PKCS7_ENCRYPT | ||
| 93 | .Fa "PKCS7_ENCRYPT **val_out" | ||
| 94 | .Fa "const unsigned char **der_in" | ||
| 95 | .Fa "long length" | ||
| 96 | .Fc | ||
| 97 | .Ft int | ||
| 98 | .Fo i2d_PKCS7_ENCRYPT | ||
| 99 | .Fa "PKCS7_ENCRYPT *val_in" | ||
| 100 | .Fa "unsigned char **der_out" | ||
| 101 | .Fc | ||
| 102 | .Ft PKCS7_ENC_CONTENT * | ||
| 103 | .Fo d2i_PKCS7_ENC_CONTENT | ||
| 104 | .Fa "PKCS7_ENC_CONTENT **val_out" | ||
| 105 | .Fa "const unsigned char **der_in" | ||
| 106 | .Fa "long length" | ||
| 107 | .Fc | ||
| 108 | .Ft int | ||
| 109 | .Fo i2d_PKCS7_ENC_CONTENT | ||
| 110 | .Fa "PKCS7_ENC_CONTENT *val_in" | ||
| 111 | .Fa "unsigned char **der_out" | ||
| 112 | .Fc | ||
| 113 | .Ft PKCS7_ENVELOPE * | ||
| 114 | .Fo d2i_PKCS7_ENVELOPE | ||
| 115 | .Fa "PKCS7_ENVELOPE **val_out" | ||
| 116 | .Fa "const unsigned char **der_in" | ||
| 117 | .Fa "long length" | ||
| 118 | .Fc | ||
| 119 | .Ft int | ||
| 120 | .Fo i2d_PKCS7_ENVELOPE | ||
| 121 | .Fa "PKCS7_ENVELOPE *val_in" | ||
| 122 | .Fa "unsigned char **der_out" | ||
| 123 | .Fc | ||
| 124 | .Ft PKCS7_ISSUER_AND_SERIAL * | ||
| 125 | .Fo d2i_PKCS7_ISSUER_AND_SERIAL | ||
| 126 | .Fa "PKCS7_ISSUER_AND_SERIAL **val_out" | ||
| 127 | .Fa "const unsigned char **der_in" | ||
| 128 | .Fa "long length" | ||
| 129 | .Fc | ||
| 130 | .Ft int | ||
| 131 | .Fo i2d_PKCS7_ISSUER_AND_SERIAL | ||
| 132 | .Fa "PKCS7_ISSUER_AND_SERIAL *val_in" | ||
| 133 | .Fa "unsigned char **der_out" | ||
| 134 | .Fc | ||
| 135 | .Ft PKCS7_RECIP_INFO * | ||
| 136 | .Fo d2i_PKCS7_RECIP_INFO | ||
| 137 | .Fa "PKCS7_RECIP_INFO **val_out" | ||
| 138 | .Fa "const unsigned char **der_in" | ||
| 139 | .Fa "long length" | ||
| 140 | .Fc | ||
| 141 | .Ft int | ||
| 142 | .Fo i2d_PKCS7_RECIP_INFO | ||
| 143 | .Fa "PKCS7_RECIP_INFO *val_in" | ||
| 144 | .Fa "unsigned char **der_out" | ||
| 145 | .Fc | ||
| 146 | .Ft PKCS7_SIGNED * | ||
| 147 | .Fo d2i_PKCS7_SIGNED | ||
| 148 | .Fa "PKCS7_SIGNED **val_out" | ||
| 149 | .Fa "const unsigned char **der_in" | ||
| 150 | .Fa "long length" | ||
| 151 | .Fc | ||
| 152 | .Ft int | ||
| 153 | .Fo i2d_PKCS7_SIGNED | ||
| 154 | .Fa "PKCS7_SIGNED *val_in" | ||
| 155 | .Fa "unsigned char **der_out" | ||
| 156 | .Fc | ||
| 157 | .Ft PKCS7_SIGNER_INFO * | ||
| 158 | .Fo d2i_PKCS7_SIGNER_INFO | ||
| 159 | .Fa "PKCS7_SIGNER_INFO **val_out" | ||
| 160 | .Fa "const unsigned char **der_in" | ||
| 161 | .Fa "long length" | ||
| 162 | .Fc | ||
| 163 | .Ft int | ||
| 164 | .Fo i2d_PKCS7_SIGNER_INFO | ||
| 165 | .Fa "PKCS7_SIGNER_INFO *val_in" | ||
| 166 | .Fa "unsigned char **der_out" | ||
| 167 | .Fc | ||
| 168 | .Ft PKCS7_SIGN_ENVELOPE * | ||
| 169 | .Fo d2i_PKCS7_SIGN_ENVELOPE | ||
| 170 | .Fa "PKCS7_SIGN_ENVELOPE **val_out" | ||
| 171 | .Fa "const unsigned char **der_in" | ||
| 172 | .Fa "long length" | ||
| 173 | .Fc | ||
| 174 | .Ft int | ||
| 175 | .Fo i2d_PKCS7_SIGN_ENVELOPE | ||
| 176 | .Fa "PKCS7_SIGN_ENVELOPE *val_in" | ||
| 177 | .Fa "unsigned char **der_out" | ||
| 178 | .Fc | ||
| 179 | .Sh DESCRIPTION | ||
| 180 | These functions decode and encode PKCS#7 data structures. | ||
| 181 | For details about the semantics, examples, caveats, and bugs, see | ||
| 182 | .Xr ASN1_item_d2i 3 . | ||
| 183 | .Pp | ||
| 184 | .Fn d2i_PKCS7 | ||
| 185 | and | ||
| 186 | .Fn i2d_PKCS7 | ||
| 187 | decode and encode an ASN.1 | ||
| 188 | .Vt ContentInfo | ||
| 189 | structure defined in RFC 2315 section 7. | ||
| 190 | .Fn d2i_PKCS7_bio , | ||
| 191 | .Fn i2d_PKCS7_bio , | ||
| 192 | .Fn d2i_PKCS7_fp , | ||
| 193 | and | ||
| 194 | .Fn i2d_PKCS7_fp | ||
| 195 | are similar except that they decode or encode using a | ||
| 196 | .Vt BIO | ||
| 197 | or | ||
| 198 | .Vt FILE | ||
| 199 | pointer. | ||
| 200 | .Pp | ||
| 201 | .Fn d2i_PKCS7_DIGEST | ||
| 202 | and | ||
| 203 | .Fn i2d_PKCS7_DIGEST | ||
| 204 | decode and encode an ASN.1 | ||
| 205 | .Vt DigestedData | ||
| 206 | structure defined in RFC 2315 section 12. | ||
| 207 | .Pp | ||
| 208 | .Fn d2i_PKCS7_ENCRYPT | ||
| 209 | and | ||
| 210 | .Fn i2d_PKCS7_ENCRYPT | ||
| 211 | decode and encode an ASN.1 | ||
| 212 | .Vt EncryptedData | ||
| 213 | structure defined in RFC 2315 section 13. | ||
| 214 | .Pp | ||
| 215 | .Fn d2i_PKCS7_ENC_CONTENT | ||
| 216 | and | ||
| 217 | .Fn i2d_PKCS7_ENC_CONTENT | ||
| 218 | decode and encode an ASN.1 | ||
| 219 | .Vt EncryptedContentInfo | ||
| 220 | structure defined in RFC 2315 section 10.1. | ||
| 221 | .Pp | ||
| 222 | .Fn d2i_PKCS7_ENVELOPE | ||
| 223 | and | ||
| 224 | .Fn i2d_PKCS7_ENVELOPE | ||
| 225 | decode and encode an ASN.1 | ||
| 226 | .Vt EnvelopedData | ||
| 227 | structure defined in RFC 2315 section 10. | ||
| 228 | .Pp | ||
| 229 | .Fn d2i_PKCS7_ISSUER_AND_SERIAL | ||
| 230 | and | ||
| 231 | .Fn i2d_PKCS7_ISSUER_AND_SERIAL | ||
| 232 | decode and encode an ASN.1 | ||
| 233 | .Vt IssuerAndSerialNumber | ||
| 234 | structure defined in RFC 2315 section 6.7. | ||
| 235 | .Pp | ||
| 236 | .Fn d2i_PKCS7_RECIP_INFO | ||
| 237 | and | ||
| 238 | .Fn i2d_PKCS7_RECIP_INFO | ||
| 239 | decode and encode an ASN.1 | ||
| 240 | .Vt RecipientInfo | ||
| 241 | structure defined in RFC 2315 section 10.2. | ||
| 242 | .Pp | ||
| 243 | .Fn d2i_PKCS7_SIGNED | ||
| 244 | and | ||
| 245 | .Fn i2d_PKCS7_SIGNED | ||
| 246 | decode and encode an ASN.1 | ||
| 247 | .Vt SignedData | ||
| 248 | structure defined in RFC 2315 section 9. | ||
| 249 | .Pp | ||
| 250 | .Fn d2i_PKCS7_SIGNER_INFO | ||
| 251 | and | ||
| 252 | .Fn i2d_PKCS7_SIGNER_INFO | ||
| 253 | decode and encode an ASN.1 | ||
| 254 | .Vt SignerInfo | ||
| 255 | structure defined in RFC 2315 section 9.2. | ||
| 256 | .Pp | ||
| 257 | .Fn d2i_PKCS7_SIGN_ENVELOPE | ||
| 258 | and | ||
| 259 | .Fn i2d_PKCS7_SIGN_ENVELOPE | ||
| 260 | decode and encode an ASN.1 | ||
| 261 | .Vt SignedAndEnvelopedData | ||
| 262 | structure defined in RFC 2315 section 11. | ||
| 263 | .Sh RETURN VALUES | ||
| 264 | .Fn d2i_PKCS7 , | ||
| 265 | .Fn d2i_PKCS7_bio , | ||
| 266 | and | ||
| 267 | .Fn d2i_PKCS7_fp | ||
| 268 | return a | ||
| 269 | .Vt PKCS7 | ||
| 270 | object or | ||
| 271 | .Dv NULL | ||
| 272 | if an error occurs. | ||
| 273 | .Pp | ||
| 274 | .Fn d2i_PKCS7_DIGEST , | ||
| 275 | .Fn d2i_PKCS7_ENCRYPT , | ||
| 276 | .Fn d2i_PKCS7_ENC_CONTENT , | ||
| 277 | .Fn d2i_PKCS7_ENVELOPE , | ||
| 278 | .Fn d2i_PKCS7_ISSUER_AND_SERIAL , | ||
| 279 | .Fn d2i_PKCS7_RECIP_INFO , | ||
| 280 | .Fn d2i_PKCS7_SIGNED , | ||
| 281 | .Fn d2i_PKCS7_SIGNER_INFO , | ||
| 282 | and | ||
| 283 | .Fn d2i_PKCS7_SIGN_ENVELOPE | ||
| 284 | return an object of the respective type or | ||
| 285 | .Dv NULL | ||
| 286 | if an error occurs. | ||
| 287 | .Pp | ||
| 288 | .Fn i2d_PKCS7 , | ||
| 289 | .Fn i2d_PKCS7_DIGEST , | ||
| 290 | .Fn i2d_PKCS7_ENCRYPT , | ||
| 291 | .Fn i2d_PKCS7_ENC_CONTENT , | ||
| 292 | .Fn i2d_PKCS7_ENVELOPE , | ||
| 293 | .Fn i2d_PKCS7_ISSUER_AND_SERIAL , | ||
| 294 | .Fn i2d_PKCS7_RECIP_INFO , | ||
| 295 | .Fn i2d_PKCS7_SIGNED , | ||
| 296 | .Fn i2d_PKCS7_SIGNER_INFO , | ||
| 297 | and | ||
| 298 | .Fn i2d_PKCS7_SIGN_ENVELOPE | ||
| 299 | return the number of bytes successfully encoded or a negative value | ||
| 300 | if an error occurs. | ||
| 301 | .Pp | ||
| 302 | .Fn i2d_PKCS7_bio | ||
| 303 | and | ||
| 304 | .Fn i2d_PKCS7_fp | ||
| 305 | return 1 for success or 0 if an error occurs. | ||
| 306 | .Sh SEE ALSO | ||
| 307 | .Xr ASN1_item_d2i 3 , | ||
| 308 | .Xr i2d_PKCS7_bio_stream 3 , | ||
| 309 | .Xr PEM_write_bio_PKCS7_stream 3 , | ||
| 310 | .Xr PEM_write_PKCS7 3 , | ||
| 311 | .Xr PKCS7_new 3 , | ||
| 312 | .Xr SMIME_write_PKCS7 3 | ||
| 313 | .Sh STANDARDS | ||
| 314 | RFC 2315: PKCS #7: Cryptographic Message Syntax Version 1.5 | ||
