OpenBSD manual page server

Manual Page Search Parameters

PKCS7_NEW(3) Library Functions Manual PKCS7_NEW(3)

PKCS7_new, PKCS7_free, PKCS7_SIGNED_new, PKCS7_SIGNED_free, PKCS7_ENVELOPE_new, PKCS7_ENVELOPE_free, PKCS7_SIGN_ENVELOPE_new, PKCS7_SIGN_ENVELOPE_free, PKCS7_DIGEST_new, PKCS7_DIGEST_free, PKCS7_ENCRYPT_new, PKCS7_ENCRYPT_free, PKCS7_ENC_CONTENT_new, PKCS7_ENC_CONTENT_free, PKCS7_SIGNER_INFO_new, PKCS7_SIGNER_INFO_free, PKCS7_RECIP_INFO_new, PKCS7_RECIP_INFO_free, PKCS7_ISSUER_AND_SERIAL_new, PKCS7_ISSUER_AND_SERIAL_freePKCS#7 data structures

#include <openssl/pkcs7.h>

PKCS7 *
PKCS7_new(void);

void
PKCS7_free(PKCS7 *p7);

PKCS7_SIGNED *
PKCS7_SIGNED_new(void);

void
PKCS7_SIGNED_free(PKCS7_SIGNED *signed);

PKCS7_ENVELOPE *
PKCS7_ENVELOPE_new(void);

void
PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *envelope);

PKCS7_SIGN_ENVELOPE *
PKCS7_SIGN_ENVELOPE_new(void);

void
PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *signed_envelope);

PKCS7_DIGEST *
PKCS7_DIGEST_new(void);

void
PKCS7_DIGEST_free(PKCS7_DIGEST *digested);

PKCS7_ENCRYPT *
PKCS7_ENCRYPT_new(void);

void
PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *encrypted);

PKCS7_ENC_CONTENT *
PKCS7_ENC_CONTENT_new(void);

void
PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *content);

PKCS7_SIGNER_INFO *
PKCS7_SIGNER_INFO_new(void);

void
PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *signer);

PKCS7_RECIP_INFO *
PKCS7_RECIP_INFO_new(void);

void
PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *recip);

PKCS7_ISSUER_AND_SERIAL *
PKCS7_ISSUER_AND_SERIAL_new(void);

void
PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *cert);

PKCS#7 is an ASN.1-based format for transmitting data that has cryptography applied to it, in particular signed and encrypted data.

() allocates and initializes an empty PKCS7 object, representing an ASN.1 ContentInfo structure defined in RFC 2315 section 7. It is the top-level data structure able to hold any kind of content that can be transmitted using PKCS#7. It can be used recursively in PKCS7_SIGNED and PKCS7_DIGEST objects. () frees p7.

() allocates and initializes an empty PKCS7_SIGNED object, representing an ASN.1 SignedData structure defined in RFC 2315 section 9. It can be used inside PKCS7 objects and holds any kind of content together with signatures by zero or more signers and information about the signing algorithm and certificates used. () frees signed.

() allocates and initializes an empty PKCS7_ENVELOPE object, representing an ASN.1 EnvelopedData structure defined in RFC 2315 section 10. It can be used inside PKCS7 objects and holds any kind of encrypted content together with content-encryption keys for one or more recipients. () frees envelope.

() allocates and initializes an empty PKCS7_SIGN_ENVELOPE object, representing an ASN.1 SignedAndEnvelopedData structure defined in RFC 2315 section 11. It can be used inside PKCS7 objects and holds any kind of encrypted content together with signatures by one or more signers, information about the signing algorithm and certificates used, and content-encryption keys for one or more recipients. () frees signed_envelope.

() allocates and initializes an empty PKCS7_DIGEST object, representing an ASN.1 DigestedData structure defined in RFC 2315 section 12. It can be used inside PKCS7 objects and holds any kind of content together with a message digest for checking its integrity and information about the algorithm used. () frees digested.

() allocates and initializes an empty PKCS7_ENCRYPT object, representing an ASN.1 EncryptedData structure defined in RFC 2315 section 13. It can be used inside PKCS7 objects and holds any kind of encrypted content. Keys are not included and need to be communicated separately. () frees encrypted.

() allocates and initializes an empty PKCS7_ENC_CONTENT object, representing an ASN.1 EncryptedContentInfo structure defined in RFC 2315 section 10.1. It can be used inside PKCS7_ENVELOPE, PKCS7_SIGN_ENVELOPE, and PKCS7_ENCRYPT objects and holds encrypted content together with information about the encryption algorithm used. () frees content.

() allocates and initializes an empty PKCS7_SIGNER_INFO object, representing an ASN.1 SignerInfo structure defined in RFC 2315 section 9.2. It can be used inside PKCS7_SIGNED and PKCS7_SIGN_ENVELOPE objects and holds a signature together with information about the signer and the algorithms used. () frees signer.

() allocates and initializes an empty PKCS7_RECIP_INFO object, representing an ASN.1 RecipientInfo structure defined in RFC 2315 section 10.2. It can be used inside PKCS7_ENVELOPE and PKCS7_SIGN_ENVELOPE objects and holds a content-encryption key together with information about the intended recipient and the key encryption algorithm used. () frees recip.

() allocates and initializes an empty PKCS7_ISSUER_AND_SERIAL object, representing an ASN.1 IssuerAndSerialNumber structure defined in RFC 2315 section 6.7. It can be used inside PKCS7_SIGNER_INFO and PKCS7_RECIP_INFO objects and identifies a certificate by holding the distinguished name of the certificate issuer and an issuer-specific certificate serial number. () frees cert.

crypto(3), d2i_PKCS7(3), i2d_PKCS7_bio_stream(3), PEM_read_PKCS7(3), PEM_write_bio_PKCS7_stream(3), PKCS7_add_attribute(3), PKCS7_dataFinal(3), PKCS7_dataInit(3), PKCS7_decrypt(3), PKCS7_encrypt(3), PKCS7_final(3), PKCS7_get_signer_info(3), PKCS7_ISSUER_AND_SERIAL_digest(3), PKCS7_set_content(3), PKCS7_set_type(3), PKCS7_sign(3), PKCS7_sign_add_signer(3), PKCS7_verify(3), SMIME_read_PKCS7(3), SMIME_write_PKCS7(3)

RFC 2315: PKCS #7: Cryptographic Message Syntax Version 1.5

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

June 10, 2020 OpenBSD-7.3