summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs7/pkcs7.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/pkcs7/pkcs7.h')
-rw-r--r--src/lib/libcrypto/pkcs7/pkcs7.h43
1 files changed, 25 insertions, 18 deletions
diff --git a/src/lib/libcrypto/pkcs7/pkcs7.h b/src/lib/libcrypto/pkcs7/pkcs7.h
index 3ec725d226..1b817e605d 100644
--- a/src/lib/libcrypto/pkcs7/pkcs7.h
+++ b/src/lib/libcrypto/pkcs7/pkcs7.h
@@ -59,15 +59,13 @@
59#ifndef HEADER_PKCS7_H 59#ifndef HEADER_PKCS7_H
60#define HEADER_PKCS7_H 60#define HEADER_PKCS7_H
61 61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66#include <openssl/bio.h> 62#include <openssl/bio.h>
67#include <openssl/x509.h> 63#include <openssl/x509.h>
68 64
69#ifdef VMS 65#include <openssl/symhacks.h>
70#include <openssl/vms_idhacks.h> 66
67#ifdef __cplusplus
68extern "C" {
71#endif 69#endif
72 70
73#ifdef WIN32 71#ifdef WIN32
@@ -210,9 +208,16 @@ typedef struct pkcs7_st
210 208
211 /* NID_pkcs7_encrypted */ 209 /* NID_pkcs7_encrypted */
212 PKCS7_ENCRYPT *encrypted; 210 PKCS7_ENCRYPT *encrypted;
211
212 /* Anything else */
213 ASN1_TYPE *other;
213 } d; 214 } d;
214 } PKCS7; 215 } PKCS7;
215 216
217DECLARE_STACK_OF(PKCS7)
218DECLARE_ASN1_SET_OF(PKCS7)
219DECLARE_PKCS12_STACK_OF(PKCS7)
220
216#define PKCS7_OP_SET_DETACHED_SIGNATURE 1 221#define PKCS7_OP_SET_DETACHED_SIGNATURE 1
217#define PKCS7_OP_GET_DETACHED_SIGNATURE 2 222#define PKCS7_OP_GET_DETACHED_SIGNATURE 2
218 223
@@ -240,15 +245,16 @@ typedef struct pkcs7_st
240 245
241/* S/MIME related flags */ 246/* S/MIME related flags */
242 247
243#define PKCS7_TEXT 0x1 248#define PKCS7_TEXT 0x1
244#define PKCS7_NOCERTS 0x2 249#define PKCS7_NOCERTS 0x2
245#define PKCS7_NOSIGS 0x4 250#define PKCS7_NOSIGS 0x4
246#define PKCS7_NOCHAIN 0x8 251#define PKCS7_NOCHAIN 0x8
247#define PKCS7_NOINTERN 0x10 252#define PKCS7_NOINTERN 0x10
248#define PKCS7_NOVERIFY 0x20 253#define PKCS7_NOVERIFY 0x20
249#define PKCS7_DETACHED 0x40 254#define PKCS7_DETACHED 0x40
250#define PKCS7_BINARY 0x80 255#define PKCS7_BINARY 0x80
251#define PKCS7_NOATTR 0x100 256#define PKCS7_NOATTR 0x100
257#define PKCS7_NOSMIMECAP 0x200
252 258
253/* Flags: for compatibility with older code */ 259/* Flags: for compatibility with older code */
254 260
@@ -402,9 +408,10 @@ PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, EVP_CIPHER *cipher,
402 int flags); 408 int flags);
403int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); 409int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags);
404 410
405int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK *cap); 411int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
406STACK *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si); 412 STACK_OF(X509_ALGOR) *cap);
407int PKCS7_simple_smimecap(STACK *sk, int nid, int arg); 413STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
414int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg);
408 415
409int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags); 416int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
410PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont); 417PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);