1.\" $OpenBSD: CMS_ContentInfo_new.3,v 1.4 2024/01/22 14:00:13 tb Exp $ 2.\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org> 3.\" 4.\" Permission to use, copy, modify, and distribute this software for any 5.\" purpose with or without fee is hereby granted, provided that the above 6.\" copyright notice and this permission notice appear in all copies. 7.\" 8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" 16.Dd $Mdocdate: January 22 2024 $ 17.Dt CMS_CONTENTINFO_NEW 3 18.Os 19.Sh NAME 20.Nm CMS_ContentInfo_new , 21.Nm CMS_ContentInfo_free , 22.Nm CMS_ContentInfo_print_ctx , 23.Nm CMS_ReceiptRequest_new , 24.Nm CMS_ReceiptRequest_free 25.Nd Cryptographic Message Syntax data structures 26.Sh SYNOPSIS 27.In openssl/cms.h 28.Ft CMS_ContentInfo * 29.Fn CMS_ContentInfo_new void 30.Ft void 31.Fn CMS_ContentInfo_free "CMS_ContentInfo *cms" 32.Ft int 33.Fo CMS_ContentInfo_print_ctx 34.Fa "BIO *out" 35.Fa "CMS_ContentInfo *cms" 36.Fa "int indent" 37.Fa "const ASN1_PCTX *pctx" 38.Fc 39.Ft CMS_ReceiptRequest * 40.Fn CMS_ReceiptRequest_new void 41.Ft void 42.Fn CMS_ReceiptRequest_free "CMS_ReceiptRequest *rr" 43.Sh DESCRIPTION 44.Fn CMS_ContentInfo_new 45allocates and initializes an empty 46.Vt CMS_ContentInfo 47object, representing an ASN.1 48.Vt ContentInfo 49structure defined in RFC 5652 section 3. 50It can hold a pointer to an ASN.1 OBJECT IDENTIFIER 51and a pointer to either a 52.Vt SignedData , 53.Vt EnvelopedData , 54.Vt DigestedData , 55.Vt EncryptedData , 56.Vt AuthenticatedData , 57or 58.Vt CompressedData 59object or to an arbitrary ASN.1 object. 60.Fn CMS_ContentInfo_free 61frees 62.Fa cms . 63.Pp 64.Fn CMS_ContentInfo_print_ctx 65prints a human readable representation of 66.Fa cms 67to 68.Fa out . 69.Pp 70.Fn CMS_ReceiptRequest_new 71allocates and initializes an empty 72.Vt CMS_ReceiptRequest 73object, representing an ASN.1 74.Vt ReceiptRequest 75structure defined in RFC 2634 section 2.7. 76It can contain a content identifier, a list of recipients requested 77to return a signed receipt, and a list of users to send the receipt to. 78.Fn CMS_ReceiptRequest_free 79frees 80.Fa rr . 81.Sh RETURN VALUES 82.Fn CMS_ContentInfo_new 83and 84.Fn CMS_ReceiptRequest_new 85return the new 86.Vt CMS_ContentInfo 87or 88.Vt CMS_ReceiptRequest 89object, respectively, or 90.Dv NULL 91if an error occurs. 92.Sh SEE ALSO 93.Xr BIO_new_CMS 3 , 94.Xr CMS_add0_cert 3 , 95.Xr CMS_add1_recipient_cert 3 , 96.Xr CMS_add1_signer 3 , 97.Xr CMS_compress 3 , 98.Xr CMS_decrypt 3 , 99.Xr CMS_encrypt 3 , 100.Xr CMS_final 3 , 101.Xr CMS_get0_RecipientInfos 3 , 102.Xr CMS_get0_SignerInfos 3 , 103.Xr CMS_get0_type 3 , 104.Xr CMS_get1_ReceiptRequest 3 , 105.Xr CMS_sign 3 , 106.Xr CMS_sign_receipt 3 , 107.Xr CMS_signed_add1_attr 3 , 108.Xr CMS_uncompress 3 , 109.Xr CMS_verify 3 , 110.Xr CMS_verify_receipt 3 , 111.Xr crypto 3 , 112.Xr d2i_CMS_ContentInfo 3 , 113.Xr i2d_CMS_bio_stream 3 , 114.Xr PEM_read_bio_PrivateKey 3 , 115.Xr PEM_write_bio_CMS_stream 3 , 116.Xr SMIME_read_CMS 3 , 117.Xr SMIME_write_CMS 3 118.Sh STANDARDS 119RFC 5652: Cryptographic Message Syntax, section 3: General Syntax 120.Pp 121RFC 3274: Compressed Data Content Type for Cryptographic Message Syntax (CMS) 122.Pp 123RFC 2634: Enhanced Security Services for S/MIME, 124section 2.7: Receipt Request Syntax 125.Sh HISTORY 126.Fn CMS_ContentInfo_new , 127.Fn CMS_ContentInfo_free , 128.Fn CMS_ReceiptRequest_new , 129and 130.Fn CMS_ReceiptRequest_free 131first appeared in OpenSSL 0.9.8h and 132.Fn CMS_ContentInfo_print_ctx 133in OpenSSL 1.0.0. 134This functions have been available since 135.Ox 6.7 . 136