15#ifndef OPENSSL_PKCS7_H
16# define OPENSSL_PKCS7_H
19# include <openssl/macros.h>
20# ifndef OPENSSL_NO_DEPRECATED_3_0
21# define HEADER_PKCS7_H
24# include <openssl/asn1.h>
25# include <openssl/bio.h>
26# include <openssl/e_os2.h>
28# include <openssl/symhacks.h>
29# include <openssl/types.h>
30# include <openssl/pkcs7err.h>
55 ASN1_INTEGER *version;
57 X509_ALGOR *digest_alg;
58 STACK_OF(X509_ATTRIBUTE) *auth_attr;
59 X509_ALGOR *digest_enc_alg;
60 ASN1_OCTET_STRING *enc_digest;
61 STACK_OF(X509_ATTRIBUTE) *unauth_attr;
67#define sk_PKCS7_SIGNER_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk))
68#define sk_PKCS7_SIGNER_INFO_value(sk, idx) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_value(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk), (idx)))
69#define sk_PKCS7_SIGNER_INFO_new(cmp) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_new(ossl_check_PKCS7_SIGNER_INFO_compfunc_type(cmp)))
70#define sk_PKCS7_SIGNER_INFO_new_null() ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_new_null())
71#define sk_PKCS7_SIGNER_INFO_new_reserve(cmp, n) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_new_reserve(ossl_check_PKCS7_SIGNER_INFO_compfunc_type(cmp), (n)))
72#define sk_PKCS7_SIGNER_INFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), (n))
73#define sk_PKCS7_SIGNER_INFO_free(sk) OPENSSL_sk_free(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk))
74#define sk_PKCS7_SIGNER_INFO_zero(sk) OPENSSL_sk_zero(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk))
75#define sk_PKCS7_SIGNER_INFO_delete(sk, i) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_delete(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), (i)))
76#define sk_PKCS7_SIGNER_INFO_delete_ptr(sk, ptr) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_delete_ptr(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr)))
77#define sk_PKCS7_SIGNER_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
78#define sk_PKCS7_SIGNER_INFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
79#define sk_PKCS7_SIGNER_INFO_pop(sk) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_pop(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk)))
80#define sk_PKCS7_SIGNER_INFO_shift(sk) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_shift(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk)))
81#define sk_PKCS7_SIGNER_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk),ossl_check_PKCS7_SIGNER_INFO_freefunc_type(freefunc))
82#define sk_PKCS7_SIGNER_INFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr), (idx))
83#define sk_PKCS7_SIGNER_INFO_set(sk, idx, ptr) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_set(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), (idx), ossl_check_PKCS7_SIGNER_INFO_type(ptr)))
84#define sk_PKCS7_SIGNER_INFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
85#define sk_PKCS7_SIGNER_INFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr))
86#define sk_PKCS7_SIGNER_INFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_type(ptr), pnum)
87#define sk_PKCS7_SIGNER_INFO_sort(sk) OPENSSL_sk_sort(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk))
88#define sk_PKCS7_SIGNER_INFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk))
89#define sk_PKCS7_SIGNER_INFO_dup(sk) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_dup(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk)))
90#define sk_PKCS7_SIGNER_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_copyfunc_type(copyfunc), ossl_check_PKCS7_SIGNER_INFO_freefunc_type(freefunc)))
91#define sk_PKCS7_SIGNER_INFO_set_cmp_func(sk, cmp) ((sk_PKCS7_SIGNER_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_compfunc_type(cmp)))
95 ASN1_INTEGER *version;
97 X509_ALGOR *key_enc_algor;
98 ASN1_OCTET_STRING *enc_key;
103#define sk_PKCS7_RECIP_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk))
104#define sk_PKCS7_RECIP_INFO_value(sk, idx) ((PKCS7_RECIP_INFO *)OPENSSL_sk_value(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk), (idx)))
105#define sk_PKCS7_RECIP_INFO_new(cmp) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_new(ossl_check_PKCS7_RECIP_INFO_compfunc_type(cmp)))
106#define sk_PKCS7_RECIP_INFO_new_null() ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_new_null())
107#define sk_PKCS7_RECIP_INFO_new_reserve(cmp, n) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_new_reserve(ossl_check_PKCS7_RECIP_INFO_compfunc_type(cmp), (n)))
108#define sk_PKCS7_RECIP_INFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), (n))
109#define sk_PKCS7_RECIP_INFO_free(sk) OPENSSL_sk_free(ossl_check_PKCS7_RECIP_INFO_sk_type(sk))
110#define sk_PKCS7_RECIP_INFO_zero(sk) OPENSSL_sk_zero(ossl_check_PKCS7_RECIP_INFO_sk_type(sk))
111#define sk_PKCS7_RECIP_INFO_delete(sk, i) ((PKCS7_RECIP_INFO *)OPENSSL_sk_delete(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), (i)))
112#define sk_PKCS7_RECIP_INFO_delete_ptr(sk, ptr) ((PKCS7_RECIP_INFO *)OPENSSL_sk_delete_ptr(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr)))
113#define sk_PKCS7_RECIP_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
114#define sk_PKCS7_RECIP_INFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
115#define sk_PKCS7_RECIP_INFO_pop(sk) ((PKCS7_RECIP_INFO *)OPENSSL_sk_pop(ossl_check_PKCS7_RECIP_INFO_sk_type(sk)))
116#define sk_PKCS7_RECIP_INFO_shift(sk) ((PKCS7_RECIP_INFO *)OPENSSL_sk_shift(ossl_check_PKCS7_RECIP_INFO_sk_type(sk)))
117#define sk_PKCS7_RECIP_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PKCS7_RECIP_INFO_sk_type(sk),ossl_check_PKCS7_RECIP_INFO_freefunc_type(freefunc))
118#define sk_PKCS7_RECIP_INFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr), (idx))
119#define sk_PKCS7_RECIP_INFO_set(sk, idx, ptr) ((PKCS7_RECIP_INFO *)OPENSSL_sk_set(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), (idx), ossl_check_PKCS7_RECIP_INFO_type(ptr)))
120#define sk_PKCS7_RECIP_INFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
121#define sk_PKCS7_RECIP_INFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr))
122#define sk_PKCS7_RECIP_INFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_type(ptr), pnum)
123#define sk_PKCS7_RECIP_INFO_sort(sk) OPENSSL_sk_sort(ossl_check_PKCS7_RECIP_INFO_sk_type(sk))
124#define sk_PKCS7_RECIP_INFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk))
125#define sk_PKCS7_RECIP_INFO_dup(sk) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_dup(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk)))
126#define sk_PKCS7_RECIP_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_copyfunc_type(copyfunc), ossl_check_PKCS7_RECIP_INFO_freefunc_type(freefunc)))
127#define sk_PKCS7_RECIP_INFO_set_cmp_func(sk, cmp) ((sk_PKCS7_RECIP_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_compfunc_type(cmp)))
132 ASN1_INTEGER *version;
133 STACK_OF(X509_ALGOR) *md_algs;
134 STACK_OF(X509) *cert;
135 STACK_OF(X509_CRL) *crl;
145 ASN1_OBJECT *content_type;
146 X509_ALGOR *algorithm;
147 ASN1_OCTET_STRING *enc_data;
148 const EVP_CIPHER *cipher;
153 ASN1_INTEGER *version;
159 ASN1_INTEGER *version;
160 STACK_OF(X509_ALGOR) *md_algs;
161 STACK_OF(X509) *cert;
162 STACK_OF(X509_CRL) *crl;
169 ASN1_INTEGER *version;
172 ASN1_OCTET_STRING *digest;
176 ASN1_INTEGER *version;
187# define PKCS7_S_HEADER 0
188# define PKCS7_S_BODY 1
189# define PKCS7_S_TAIL 2
201 ASN1_OCTET_STRING *data;
218#define sk_PKCS7_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_sk_type(sk))
219#define sk_PKCS7_value(sk, idx) ((PKCS7 *)OPENSSL_sk_value(ossl_check_const_PKCS7_sk_type(sk), (idx)))
220#define sk_PKCS7_new(cmp) ((STACK_OF(PKCS7) *)OPENSSL_sk_new(ossl_check_PKCS7_compfunc_type(cmp)))
221#define sk_PKCS7_new_null() ((STACK_OF(PKCS7) *)OPENSSL_sk_new_null())
222#define sk_PKCS7_new_reserve(cmp, n) ((STACK_OF(PKCS7) *)OPENSSL_sk_new_reserve(ossl_check_PKCS7_compfunc_type(cmp), (n)))
223#define sk_PKCS7_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PKCS7_sk_type(sk), (n))
224#define sk_PKCS7_free(sk) OPENSSL_sk_free(ossl_check_PKCS7_sk_type(sk))
225#define sk_PKCS7_zero(sk) OPENSSL_sk_zero(ossl_check_PKCS7_sk_type(sk))
226#define sk_PKCS7_delete(sk, i) ((PKCS7 *)OPENSSL_sk_delete(ossl_check_PKCS7_sk_type(sk), (i)))
227#define sk_PKCS7_delete_ptr(sk, ptr) ((PKCS7 *)OPENSSL_sk_delete_ptr(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr)))
228#define sk_PKCS7_push(sk, ptr) OPENSSL_sk_push(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
229#define sk_PKCS7_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
230#define sk_PKCS7_pop(sk) ((PKCS7 *)OPENSSL_sk_pop(ossl_check_PKCS7_sk_type(sk)))
231#define sk_PKCS7_shift(sk) ((PKCS7 *)OPENSSL_sk_shift(ossl_check_PKCS7_sk_type(sk)))
232#define sk_PKCS7_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PKCS7_sk_type(sk),ossl_check_PKCS7_freefunc_type(freefunc))
233#define sk_PKCS7_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr), (idx))
234#define sk_PKCS7_set(sk, idx, ptr) ((PKCS7 *)OPENSSL_sk_set(ossl_check_PKCS7_sk_type(sk), (idx), ossl_check_PKCS7_type(ptr)))
235#define sk_PKCS7_find(sk, ptr) OPENSSL_sk_find(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
236#define sk_PKCS7_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr))
237#define sk_PKCS7_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_type(ptr), pnum)
238#define sk_PKCS7_sort(sk) OPENSSL_sk_sort(ossl_check_PKCS7_sk_type(sk))
239#define sk_PKCS7_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PKCS7_sk_type(sk))
240#define sk_PKCS7_dup(sk) ((STACK_OF(PKCS7) *)OPENSSL_sk_dup(ossl_check_const_PKCS7_sk_type(sk)))
241#define sk_PKCS7_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_sk_type(sk), ossl_check_PKCS7_copyfunc_type(copyfunc), ossl_check_PKCS7_freefunc_type(freefunc)))
242#define sk_PKCS7_set_cmp_func(sk, cmp) ((sk_PKCS7_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_compfunc_type(cmp)))
246# define PKCS7_OP_SET_DETACHED_SIGNATURE 1
247# define PKCS7_OP_GET_DETACHED_SIGNATURE 2
249# define PKCS7_get_signed_attributes(si) ((si)->auth_attr)
250# define PKCS7_get_attributes(si) ((si)->unauth_attr)
252# define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)
253# define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
254# define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)
255# define PKCS7_type_is_signedAndEnveloped(a) \
256 (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)
257# define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data)
258# define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
260# define PKCS7_set_detached(p,v) \
261 PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)
262# define PKCS7_get_detached(p) \
263 PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)
265# define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
269# define PKCS7_TEXT 0x1
270# define PKCS7_NOCERTS 0x2
271# define PKCS7_NOSIGS 0x4
272# define PKCS7_NOCHAIN 0x8
273# define PKCS7_NOINTERN 0x10
274# define PKCS7_NOVERIFY 0x20
275# define PKCS7_DETACHED 0x40
276# define PKCS7_BINARY 0x80
277# define PKCS7_NOATTR 0x100
278# define PKCS7_NOSMIMECAP 0x200
279# define PKCS7_NOOLDMIMETYPE 0x400
280# define PKCS7_CRLFEOL 0x800
281# define PKCS7_STREAM 0x1000
282# define PKCS7_NOCRL 0x2000
283# define PKCS7_PARTIAL 0x4000
284# define PKCS7_REUSE_DIGEST 0x8000
285# define PKCS7_NO_DUAL_CONTENT 0x10000
289# define SMIME_TEXT PKCS7_TEXT
290# define SMIME_NOCERTS PKCS7_NOCERTS
291# define SMIME_NOSIGS PKCS7_NOSIGS
292# define SMIME_NOCHAIN PKCS7_NOCHAIN
293# define SMIME_NOINTERN PKCS7_NOINTERN
294# define SMIME_NOVERIFY PKCS7_NOVERIFY
295# define SMIME_DETACHED PKCS7_DETACHED
296# define SMIME_BINARY PKCS7_BINARY
297# define SMIME_NOATTR PKCS7_NOATTR
300# define SMIME_ASCIICRLF 0x80000
305 const EVP_MD *type,
unsigned char *md,
307# ifndef OPENSSL_NO_STDIO
309int i2d_PKCS7_fp(FILE *fp,
const PKCS7 *p7);
311DECLARE_ASN1_DUP_FUNCTION(
PKCS7)
313int i2d_PKCS7_bio(BIO *bp,
const PKCS7 *p7);
314int i2d_PKCS7_bio_stream(BIO *out,
PKCS7 *p7, BIO *in,
int flags);
315int PEM_write_bio_PKCS7_stream(BIO *out,
PKCS7 *p7, BIO *in,
int flags);
325DECLARE_ASN1_FUNCTIONS(
PKCS7)
326PKCS7 *PKCS7_new_ex(OSSL_LIB_CTX *libctx,
const char *propq);
328DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN)
329DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY)
331DECLARE_ASN1_NDEF_FUNCTION(
PKCS7)
332DECLARE_ASN1_PRINT_FUNCTION(
PKCS7)
334long PKCS7_ctrl(
PKCS7 *p7,
int cmd,
long larg,
char *parg);
336int PKCS7_type_is_other(
PKCS7 *p7);
337int PKCS7_set_type(
PKCS7 *p7,
int type);
338int PKCS7_set0_type_other(
PKCS7 *p7,
int type, ASN1_TYPE *other);
339int PKCS7_set_content(
PKCS7 *p7,
PKCS7 *p7_data);
344int PKCS7_add_certificate(
PKCS7 *p7, X509 *x509);
345int PKCS7_add_crl(
PKCS7 *p7, X509_CRL *x509);
346int PKCS7_content_new(
PKCS7 *p7,
int nid);
347int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
352BIO *PKCS7_dataInit(
PKCS7 *p7, BIO *bio);
353int PKCS7_dataFinal(
PKCS7 *p7, BIO *bio);
354BIO *PKCS7_dataDecode(
PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
357 EVP_PKEY *pkey,
const EVP_MD *dgst);
359int PKCS7_set_digest(
PKCS7 *p7,
const EVP_MD *md);
364 X509_ALGOR **pdig, X509_ALGOR **psig);
368int PKCS7_set_cipher(
PKCS7 *p7,
const EVP_CIPHER *cipher);
369int PKCS7_stream(
unsigned char ***boundary,
PKCS7 *p7);
372ASN1_OCTET_STRING *PKCS7_get_octet_string(
PKCS7 *p7);
373ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk);
381 STACK_OF(X509_ATTRIBUTE) *sk);
383 STACK_OF(X509_ATTRIBUTE) *sk);
385PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
386 BIO *data,
int flags);
387PKCS7 *PKCS7_sign_ex(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
388 BIO *data,
int flags, OSSL_LIB_CTX *libctx,
392 X509 *signcert, EVP_PKEY *pkey,
393 const EVP_MD *md,
int flags);
395int PKCS7_final(
PKCS7 *p7, BIO *data,
int flags);
396int PKCS7_verify(
PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
397 BIO *indata, BIO *out,
int flags);
398STACK_OF(X509) *PKCS7_get0_signers(
PKCS7 *p7, STACK_OF(X509) *certs,
400PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in,
const EVP_CIPHER *cipher,
402PKCS7 *PKCS7_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
403 const EVP_CIPHER *cipher,
int flags,
404 OSSL_LIB_CTX *libctx,
const char *propq);
405int PKCS7_decrypt(
PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
409 STACK_OF(X509_ALGOR) *cap);
411int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk,
int nid,
int arg);
416 const unsigned char *md,
int mdlen);
418int SMIME_write_PKCS7(BIO *bio,
PKCS7 *p7, BIO *data,
int flags);
419PKCS7 *SMIME_read_PKCS7_ex(BIO *bio, BIO **bcont,
PKCS7 **p7);
420PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
422BIO *BIO_new_PKCS7(BIO *out,
PKCS7 *p7);