GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PKCS7_SET_CONTENT(3) FreeBSD Library Functions Manual PKCS7_SET_CONTENT(3)

PKCS7_set_content, PKCS7_content_new
set the nested contentInfo in a PKCS#7 structure

#include <openssl/pkcs7.h>

int
PKCS7_set_content(PKCS7 *outer, PKCS7 *inner);

int
PKCS7_content_new(PKCS7 *outer, int inner_type);

If the contentType of the outer PKCS7 structure is SignedData or DigestedData, PKCS7_set_content() sets the contentInfo field of the content field of outer to inner, without copying inner. If there was previous contentInfo, it is freed rather than overwritten. The rest of the internal state of outer and of its content remains unchanged.

PKCS7_content_new() is similar except that it first allocates and initializes a new, empty inner object of the given inner_type using PKCS7_new(3) and PKCS7_set_type(3). The inner_type can be any of the NIDs listed in the PKCS7_set_type(3) manual.

These functions return 1 on success or 0 on failure. They fail if the contentType of outer is unsupported. PKCS7_content_new() can also fail when memory is exhausted. In case of failure, outer remains unchanged.

PKCS7_dataInit(3), PKCS7_new(3), PKCS7_set_type(3), PKCS7_sign(3)

RFC 2315: PKCS #7: Cryptographic Message Syntax Version 1.5
  • Section 7. General syntax
  • Section 9. Signed-data content type
  • Section 12. Digested-data content type

These functions first appeared in SSLeay 0.8.1 and have been available since OpenBSD 2.4.

Despite the function names, these functions do not set the content field of outer, but only the contentInfo field inside it. The rest of the content remains unchanged.
May 24, 2020 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.