OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions | Variables
pkcs7.h File Reference
#include <openssl/asn1.h>
#include <openssl/bio.h>
#include <openssl/e_os2.h>
#include <openssl/symhacks.h>
#include <openssl/ossl_typ.h>

Go to the source code of this file.

Classes

struct  pkcs7_issuer_and_serial_st
 
struct  pkcs7_signer_info_st
 
struct  pkcs7_recip_info_st
 
struct  pkcs7_signed_st
 
struct  pkcs7_enc_content_st
 
struct  pkcs7_enveloped_st
 
struct  pkcs7_signedandenveloped_st
 
struct  pkcs7_digest_st
 
struct  pkcs7_encrypted_st
 
struct  pkcs7_st
 

Macros

#define PKCS7_S_HEADER   0
 
#define PKCS7_S_BODY   1
 
#define PKCS7_S_TAIL   2
 
#define PKCS7_OP_SET_DETACHED_SIGNATURE   1
 
#define PKCS7_OP_GET_DETACHED_SIGNATURE   2
 
#define PKCS7_get_signed_attributes(si)   ((si)->auth_attr)
 
#define PKCS7_get_attributes(si)   ((si)->unauth_attr)
 
#define PKCS7_type_is_signed(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)
 
#define PKCS7_type_is_encrypted(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
 
#define PKCS7_type_is_enveloped(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)
 
#define PKCS7_type_is_signedAndEnveloped(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)
 
#define PKCS7_type_is_data(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_data)
 
#define PKCS7_type_is_digest(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
 
#define PKCS7_type_is_encrypted(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
 
#define PKCS7_type_is_digest(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
 
#define PKCS7_set_detached(p, v)   PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)
 
#define PKCS7_get_detached(p)   PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)
 
#define PKCS7_is_detached(p7)   (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
 
#define PKCS7_TEXT   0x1
 
#define PKCS7_NOCERTS   0x2
 
#define PKCS7_NOSIGS   0x4
 
#define PKCS7_NOCHAIN   0x8
 
#define PKCS7_NOINTERN   0x10
 
#define PKCS7_NOVERIFY   0x20
 
#define PKCS7_DETACHED   0x40
 
#define PKCS7_BINARY   0x80
 
#define PKCS7_NOATTR   0x100
 
#define PKCS7_NOSMIMECAP   0x200
 
#define PKCS7_NOOLDMIMETYPE   0x400
 
#define PKCS7_CRLFEOL   0x800
 
#define PKCS7_STREAM   0x1000
 
#define PKCS7_NOCRL   0x2000
 
#define PKCS7_PARTIAL   0x4000
 
#define PKCS7_REUSE_DIGEST   0x8000
 
#define SMIME_TEXT   PKCS7_TEXT
 
#define SMIME_NOCERTS   PKCS7_NOCERTS
 
#define SMIME_NOSIGS   PKCS7_NOSIGS
 
#define SMIME_NOCHAIN   PKCS7_NOCHAIN
 
#define SMIME_NOINTERN   PKCS7_NOINTERN
 
#define SMIME_NOVERIFY   PKCS7_NOVERIFY
 
#define SMIME_DETACHED   PKCS7_DETACHED
 
#define SMIME_BINARY   PKCS7_BINARY
 
#define SMIME_NOATTR   PKCS7_NOATTR
 
#define PKCS7_F_B64_READ_PKCS7   120
 
#define PKCS7_F_B64_WRITE_PKCS7   121
 
#define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB   136
 
#define PKCS7_F_I2D_PKCS7_BIO_STREAM   140
 
#define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME   135
 
#define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP   118
 
#define PKCS7_F_PKCS7_ADD_CERTIFICATE   100
 
#define PKCS7_F_PKCS7_ADD_CRL   101
 
#define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO   102
 
#define PKCS7_F_PKCS7_ADD_SIGNATURE   131
 
#define PKCS7_F_PKCS7_ADD_SIGNER   103
 
#define PKCS7_F_PKCS7_BIO_ADD_DIGEST   125
 
#define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST   138
 
#define PKCS7_F_PKCS7_CTRL   104
 
#define PKCS7_F_PKCS7_DATADECODE   112
 
#define PKCS7_F_PKCS7_DATAFINAL   128
 
#define PKCS7_F_PKCS7_DATAINIT   105
 
#define PKCS7_F_PKCS7_DATASIGN   106
 
#define PKCS7_F_PKCS7_DATAVERIFY   107
 
#define PKCS7_F_PKCS7_DECRYPT   114
 
#define PKCS7_F_PKCS7_DECRYPT_RINFO   133
 
#define PKCS7_F_PKCS7_ENCODE_RINFO   132
 
#define PKCS7_F_PKCS7_ENCRYPT   115
 
#define PKCS7_F_PKCS7_FINAL   134
 
#define PKCS7_F_PKCS7_FIND_DIGEST   127
 
#define PKCS7_F_PKCS7_GET0_SIGNERS   124
 
#define PKCS7_F_PKCS7_RECIP_INFO_SET   130
 
#define PKCS7_F_PKCS7_SET_CIPHER   108
 
#define PKCS7_F_PKCS7_SET_CONTENT   109
 
#define PKCS7_F_PKCS7_SET_DIGEST   126
 
#define PKCS7_F_PKCS7_SET_TYPE   110
 
#define PKCS7_F_PKCS7_SIGN   116
 
#define PKCS7_F_PKCS7_SIGNATUREVERIFY   113
 
#define PKCS7_F_PKCS7_SIGNER_INFO_SET   129
 
#define PKCS7_F_PKCS7_SIGNER_INFO_SIGN   139
 
#define PKCS7_F_PKCS7_SIGN_ADD_SIGNER   137
 
#define PKCS7_F_PKCS7_SIMPLE_SMIMECAP   119
 
#define PKCS7_F_PKCS7_VERIFY   117
 
#define PKCS7_F_SMIME_READ_PKCS7   122
 
#define PKCS7_F_SMIME_TEXT   123
 
#define PKCS7_R_CERTIFICATE_VERIFY_ERROR   117
 
#define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER   144
 
#define PKCS7_R_CIPHER_NOT_INITIALIZED   116
 
#define PKCS7_R_CONTENT_AND_DATA_PRESENT   118
 
#define PKCS7_R_CTRL_ERROR   152
 
#define PKCS7_R_DECODE_ERROR   130
 
#define PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH   100
 
#define PKCS7_R_DECRYPT_ERROR   119
 
#define PKCS7_R_DIGEST_FAILURE   101
 
#define PKCS7_R_ENCRYPTION_CTRL_FAILURE   149
 
#define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE   150
 
#define PKCS7_R_ERROR_ADDING_RECIPIENT   120
 
#define PKCS7_R_ERROR_SETTING_CIPHER   121
 
#define PKCS7_R_INVALID_MIME_TYPE   131
 
#define PKCS7_R_INVALID_NULL_POINTER   143
 
#define PKCS7_R_MIME_NO_CONTENT_TYPE   132
 
#define PKCS7_R_MIME_PARSE_ERROR   133
 
#define PKCS7_R_MIME_SIG_PARSE_ERROR   134
 
#define PKCS7_R_MISSING_CERIPEND_INFO   103
 
#define PKCS7_R_NO_CONTENT   122
 
#define PKCS7_R_NO_CONTENT_TYPE   135
 
#define PKCS7_R_NO_DEFAULT_DIGEST   151
 
#define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND   154
 
#define PKCS7_R_NO_MULTIPART_BODY_FAILURE   136
 
#define PKCS7_R_NO_MULTIPART_BOUNDARY   137
 
#define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE   115
 
#define PKCS7_R_NO_RECIPIENT_MATCHES_KEY   146
 
#define PKCS7_R_NO_SIGNATURES_ON_DATA   123
 
#define PKCS7_R_NO_SIGNERS   142
 
#define PKCS7_R_NO_SIG_CONTENT_TYPE   138
 
#define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE   104
 
#define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR   124
 
#define PKCS7_R_PKCS7_ADD_SIGNER_ERROR   153
 
#define PKCS7_R_PKCS7_DATAFINAL   126
 
#define PKCS7_R_PKCS7_DATAFINAL_ERROR   125
 
#define PKCS7_R_PKCS7_DATASIGN   145
 
#define PKCS7_R_PKCS7_PARSE_ERROR   139
 
#define PKCS7_R_PKCS7_SIG_PARSE_ERROR   140
 
#define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE   127
 
#define PKCS7_R_SIGNATURE_FAILURE   105
 
#define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND   128
 
#define PKCS7_R_SIGNING_CTRL_FAILURE   147
 
#define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE   148
 
#define PKCS7_R_SIG_INVALID_MIME_TYPE   141
 
#define PKCS7_R_SMIME_TEXT_ERROR   129
 
#define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE   106
 
#define PKCS7_R_UNABLE_TO_FIND_MEM_BIO   107
 
#define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST   108
 
#define PKCS7_R_UNKNOWN_DIGEST_TYPE   109
 
#define PKCS7_R_UNKNOWN_OPERATION   110
 
#define PKCS7_R_UNSUPPORTED_CIPHER_TYPE   111
 
#define PKCS7_R_UNSUPPORTED_CONTENT_TYPE   112
 
#define PKCS7_R_WRONG_CONTENT_TYPE   113
 
#define PKCS7_R_WRONG_PKCS7_TYPE   114
 

Typedefs

typedef struct
pkcs7_issuer_and_serial_st 
PKCS7_ISSUER_AND_SERIAL
 
typedef struct pkcs7_signer_info_st PKCS7_SIGNER_INFO
 
typedef struct pkcs7_recip_info_st PKCS7_RECIP_INFO
 
typedef struct pkcs7_signed_st PKCS7_SIGNED
 
typedef struct pkcs7_enc_content_st PKCS7_ENC_CONTENT
 
typedef struct pkcs7_enveloped_st PKCS7_ENVELOPE
 
typedef struct
pkcs7_signedandenveloped_st 
PKCS7_SIGN_ENVELOPE
 
typedef struct pkcs7_digest_st PKCS7_DIGEST
 
typedef struct pkcs7_encrypted_st PKCS7_ENCRYPT
 
typedef struct pkcs7_st PKCS7
 

Functions

int PKCS7_ISSUER_AND_SERIAL_digest (PKCS7_ISSUER_AND_SERIAL *data, const EVP_MD *type, unsigned char *md, unsigned int *len)
 
PKCS7d2i_PKCS7_fp (FILE *fp, PKCS7 **p7)
 
int i2d_PKCS7_fp (FILE *fp, PKCS7 *p7)
 
PKCS7PKCS7_dup (PKCS7 *p7)
 
PKCS7d2i_PKCS7_bio (BIO *bp, PKCS7 **p7)
 
int i2d_PKCS7_bio (BIO *bp, PKCS7 *p7)
 
int i2d_PKCS7_bio_stream (BIO *out, PKCS7 *p7, BIO *in, int flags)
 
int PEM_write_bio_PKCS7_stream (BIO *out, PKCS7 *p7, BIO *in, int flags)
 
long PKCS7_ctrl (PKCS7 *p7, int cmd, long larg, char *parg)
 
int PKCS7_set_type (PKCS7 *p7, int type)
 
int PKCS7_set0_type_other (PKCS7 *p7, int type, ASN1_TYPE *other)
 
int PKCS7_set_content (PKCS7 *p7, PKCS7 *p7_data)
 
int PKCS7_SIGNER_INFO_set (PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, const EVP_MD *dgst)
 
int PKCS7_SIGNER_INFO_sign (PKCS7_SIGNER_INFO *si)
 
int PKCS7_add_signer (PKCS7 *p7, PKCS7_SIGNER_INFO *p7i)
 
int PKCS7_add_certificate (PKCS7 *p7, X509 *x509)
 
int PKCS7_add_crl (PKCS7 *p7, X509_CRL *x509)
 
int PKCS7_content_new (PKCS7 *p7, int nid)
 
int PKCS7_dataVerify (X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si)
 
int PKCS7_signatureVerify (BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, X509 *x509)
 
BIOPKCS7_dataInit (PKCS7 *p7, BIO *bio)
 
int PKCS7_dataFinal (PKCS7 *p7, BIO *bio)
 
BIOPKCS7_dataDecode (PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
 
PKCS7_SIGNER_INFOPKCS7_add_signature (PKCS7 *p7, X509 *x509, EVP_PKEY *pkey, const EVP_MD *dgst)
 
X509PKCS7_cert_from_signer_info (PKCS7 *p7, PKCS7_SIGNER_INFO *si)
 
int PKCS7_set_digest (PKCS7 *p7, const EVP_MD *md)
 
 STACK_OF (PKCS7_SIGNER_INFO)*PKCS7_get_signer_info(PKCS7 *p7)
 
PKCS7_RECIP_INFOPKCS7_add_recipient (PKCS7 *p7, X509 *x509)
 
void PKCS7_SIGNER_INFO_get0_algs (PKCS7_SIGNER_INFO *si, EVP_PKEY **pk, X509_ALGOR **pdig, X509_ALGOR **psig)
 
void PKCS7_RECIP_INFO_get0_alg (PKCS7_RECIP_INFO *ri, X509_ALGOR **penc)
 
int PKCS7_add_recipient_info (PKCS7 *p7, PKCS7_RECIP_INFO *ri)
 
int PKCS7_RECIP_INFO_set (PKCS7_RECIP_INFO *p7i, X509 *x509)
 
int PKCS7_set_cipher (PKCS7 *p7, const EVP_CIPHER *cipher)
 
int PKCS7_stream (unsigned char ***boundary, PKCS7 *p7)
 
PKCS7_ISSUER_AND_SERIALPKCS7_get_issuer_and_serial (PKCS7 *p7, int idx)
 
ASN1_OCTET_STRINGPKCS7_digest_from_attributes (STACK_OF(X509_ATTRIBUTE)*sk)
 
int PKCS7_add_signed_attribute (PKCS7_SIGNER_INFO *p7si, int nid, int type, void *data)
 
int PKCS7_add_attribute (PKCS7_SIGNER_INFO *p7si, int nid, int atrtype, void *value)
 
ASN1_TYPEPKCS7_get_attribute (PKCS7_SIGNER_INFO *si, int nid)
 
ASN1_TYPEPKCS7_get_signed_attribute (PKCS7_SIGNER_INFO *si, int nid)
 
int PKCS7_set_signed_attributes (PKCS7_SIGNER_INFO *p7si, STACK_OF(X509_ATTRIBUTE)*sk)
 
int PKCS7_set_attributes (PKCS7_SIGNER_INFO *p7si, STACK_OF(X509_ATTRIBUTE)*sk)
 
PKCS7PKCS7_sign (X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509)*certs, BIO *data, int flags)
 
PKCS7_SIGNER_INFOPKCS7_sign_add_signer (PKCS7 *p7, X509 *signcert, EVP_PKEY *pkey, const EVP_MD *md, int flags)
 
int PKCS7_final (PKCS7 *p7, BIO *data, int flags)
 
int PKCS7_verify (PKCS7 *p7, STACK_OF(X509)*certs, X509_STORE *store, BIO *indata, BIO *out, int flags)
 
 STACK_OF (X509)*PKCS7_get0_signers(PKCS7 *p7
 
PKCS7PKCS7_encrypt (STACK_OF(X509)*certs, BIO *in, const EVP_CIPHER *cipher, int flags)
 
int PKCS7_decrypt (PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
 
int PKCS7_add_attrib_smimecap (PKCS7_SIGNER_INFO *si, STACK_OF(X509_ALGOR)*cap)
 
 STACK_OF (X509_ALGOR)*PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si)
 
int PKCS7_simple_smimecap (STACK_OF(X509_ALGOR)*sk, int nid, int arg)
 
int PKCS7_add_attrib_content_type (PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid)
 
int PKCS7_add0_attrib_signing_time (PKCS7_SIGNER_INFO *si, ASN1_TIME *t)
 
int PKCS7_add1_attrib_digest (PKCS7_SIGNER_INFO *si, const unsigned char *md, int mdlen)
 
int SMIME_write_PKCS7 (BIO *bio, PKCS7 *p7, BIO *data, int flags)
 
PKCS7SMIME_read_PKCS7 (BIO *bio, BIO **bcont)
 
BIOBIO_new_PKCS7 (BIO *out, PKCS7 *p7)
 
void ERR_load_PKCS7_strings (void)
 

Variables

int flags
 

Macro Definition Documentation

#define PKCS7_BINARY   0x80

Definition at line 257 of file pkcs7.h.

#define PKCS7_CRLFEOL   0x800

Definition at line 261 of file pkcs7.h.

#define PKCS7_DETACHED   0x40

Definition at line 256 of file pkcs7.h.

#define PKCS7_F_B64_READ_PKCS7   120

Definition at line 399 of file pkcs7.h.

#define PKCS7_F_B64_WRITE_PKCS7   121

Definition at line 400 of file pkcs7.h.

#define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB   136

Definition at line 401 of file pkcs7.h.

#define PKCS7_F_I2D_PKCS7_BIO_STREAM   140

Definition at line 402 of file pkcs7.h.

#define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME   135

Definition at line 403 of file pkcs7.h.

#define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP   118

Definition at line 404 of file pkcs7.h.

#define PKCS7_F_PKCS7_ADD_CERTIFICATE   100

Definition at line 405 of file pkcs7.h.

#define PKCS7_F_PKCS7_ADD_CRL   101

Definition at line 406 of file pkcs7.h.

#define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO   102

Definition at line 407 of file pkcs7.h.

#define PKCS7_F_PKCS7_ADD_SIGNATURE   131

Definition at line 408 of file pkcs7.h.

#define PKCS7_F_PKCS7_ADD_SIGNER   103

Definition at line 409 of file pkcs7.h.

#define PKCS7_F_PKCS7_BIO_ADD_DIGEST   125

Definition at line 410 of file pkcs7.h.

#define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST   138

Definition at line 411 of file pkcs7.h.

#define PKCS7_F_PKCS7_CTRL   104

Definition at line 412 of file pkcs7.h.

#define PKCS7_F_PKCS7_DATADECODE   112

Definition at line 413 of file pkcs7.h.

#define PKCS7_F_PKCS7_DATAFINAL   128

Definition at line 414 of file pkcs7.h.

#define PKCS7_F_PKCS7_DATAINIT   105

Definition at line 415 of file pkcs7.h.

#define PKCS7_F_PKCS7_DATASIGN   106

Definition at line 416 of file pkcs7.h.

#define PKCS7_F_PKCS7_DATAVERIFY   107

Definition at line 417 of file pkcs7.h.

#define PKCS7_F_PKCS7_DECRYPT   114

Definition at line 418 of file pkcs7.h.

#define PKCS7_F_PKCS7_DECRYPT_RINFO   133

Definition at line 419 of file pkcs7.h.

#define PKCS7_F_PKCS7_ENCODE_RINFO   132

Definition at line 420 of file pkcs7.h.

#define PKCS7_F_PKCS7_ENCRYPT   115

Definition at line 421 of file pkcs7.h.

#define PKCS7_F_PKCS7_FINAL   134

Definition at line 422 of file pkcs7.h.

#define PKCS7_F_PKCS7_FIND_DIGEST   127

Definition at line 423 of file pkcs7.h.

#define PKCS7_F_PKCS7_GET0_SIGNERS   124

Definition at line 424 of file pkcs7.h.

#define PKCS7_F_PKCS7_RECIP_INFO_SET   130

Definition at line 425 of file pkcs7.h.

#define PKCS7_F_PKCS7_SET_CIPHER   108

Definition at line 426 of file pkcs7.h.

#define PKCS7_F_PKCS7_SET_CONTENT   109

Definition at line 427 of file pkcs7.h.

#define PKCS7_F_PKCS7_SET_DIGEST   126

Definition at line 428 of file pkcs7.h.

#define PKCS7_F_PKCS7_SET_TYPE   110

Definition at line 429 of file pkcs7.h.

#define PKCS7_F_PKCS7_SIGN   116

Definition at line 430 of file pkcs7.h.

#define PKCS7_F_PKCS7_SIGN_ADD_SIGNER   137

Definition at line 434 of file pkcs7.h.

#define PKCS7_F_PKCS7_SIGNATUREVERIFY   113

Definition at line 431 of file pkcs7.h.

#define PKCS7_F_PKCS7_SIGNER_INFO_SET   129

Definition at line 432 of file pkcs7.h.

#define PKCS7_F_PKCS7_SIGNER_INFO_SIGN   139

Definition at line 433 of file pkcs7.h.

#define PKCS7_F_PKCS7_SIMPLE_SMIMECAP   119

Definition at line 435 of file pkcs7.h.

#define PKCS7_F_PKCS7_VERIFY   117

Definition at line 436 of file pkcs7.h.

#define PKCS7_F_SMIME_READ_PKCS7   122

Definition at line 437 of file pkcs7.h.

#define PKCS7_F_SMIME_TEXT   123

Definition at line 438 of file pkcs7.h.

#define PKCS7_get_attributes (   si)    ((si)->unauth_attr)

Definition at line 227 of file pkcs7.h.

#define PKCS7_get_detached (   p)    PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)

Definition at line 243 of file pkcs7.h.

#define PKCS7_get_signed_attributes (   si)    ((si)->auth_attr)

Definition at line 226 of file pkcs7.h.

#define PKCS7_is_detached (   p7)    (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))

Definition at line 246 of file pkcs7.h.

#define PKCS7_NOATTR   0x100

Definition at line 258 of file pkcs7.h.

#define PKCS7_NOCERTS   0x2

Definition at line 251 of file pkcs7.h.

#define PKCS7_NOCHAIN   0x8

Definition at line 253 of file pkcs7.h.

#define PKCS7_NOCRL   0x2000

Definition at line 263 of file pkcs7.h.

#define PKCS7_NOINTERN   0x10

Definition at line 254 of file pkcs7.h.

#define PKCS7_NOOLDMIMETYPE   0x400

Definition at line 260 of file pkcs7.h.

#define PKCS7_NOSIGS   0x4

Definition at line 252 of file pkcs7.h.

#define PKCS7_NOSMIMECAP   0x200

Definition at line 259 of file pkcs7.h.

#define PKCS7_NOVERIFY   0x20

Definition at line 255 of file pkcs7.h.

#define PKCS7_OP_GET_DETACHED_SIGNATURE   2

Definition at line 224 of file pkcs7.h.

#define PKCS7_OP_SET_DETACHED_SIGNATURE   1

Definition at line 223 of file pkcs7.h.

#define PKCS7_PARTIAL   0x4000

Definition at line 264 of file pkcs7.h.

#define PKCS7_R_CERTIFICATE_VERIFY_ERROR   117

Definition at line 441 of file pkcs7.h.

#define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER   144

Definition at line 442 of file pkcs7.h.

#define PKCS7_R_CIPHER_NOT_INITIALIZED   116

Definition at line 443 of file pkcs7.h.

#define PKCS7_R_CONTENT_AND_DATA_PRESENT   118

Definition at line 444 of file pkcs7.h.

#define PKCS7_R_CTRL_ERROR   152

Definition at line 445 of file pkcs7.h.

#define PKCS7_R_DECODE_ERROR   130

Definition at line 446 of file pkcs7.h.

#define PKCS7_R_DECRYPT_ERROR   119

Definition at line 448 of file pkcs7.h.

#define PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH   100

Definition at line 447 of file pkcs7.h.

#define PKCS7_R_DIGEST_FAILURE   101

Definition at line 449 of file pkcs7.h.

#define PKCS7_R_ENCRYPTION_CTRL_FAILURE   149

Definition at line 450 of file pkcs7.h.

#define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE   150

Definition at line 451 of file pkcs7.h.

#define PKCS7_R_ERROR_ADDING_RECIPIENT   120

Definition at line 452 of file pkcs7.h.

#define PKCS7_R_ERROR_SETTING_CIPHER   121

Definition at line 453 of file pkcs7.h.

#define PKCS7_R_INVALID_MIME_TYPE   131

Definition at line 454 of file pkcs7.h.

#define PKCS7_R_INVALID_NULL_POINTER   143

Definition at line 455 of file pkcs7.h.

#define PKCS7_R_MIME_NO_CONTENT_TYPE   132

Definition at line 456 of file pkcs7.h.

#define PKCS7_R_MIME_PARSE_ERROR   133

Definition at line 457 of file pkcs7.h.

#define PKCS7_R_MIME_SIG_PARSE_ERROR   134

Definition at line 458 of file pkcs7.h.

#define PKCS7_R_MISSING_CERIPEND_INFO   103

Definition at line 459 of file pkcs7.h.

#define PKCS7_R_NO_CONTENT   122

Definition at line 460 of file pkcs7.h.

#define PKCS7_R_NO_CONTENT_TYPE   135

Definition at line 461 of file pkcs7.h.

#define PKCS7_R_NO_DEFAULT_DIGEST   151

Definition at line 462 of file pkcs7.h.

#define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND   154

Definition at line 463 of file pkcs7.h.

#define PKCS7_R_NO_MULTIPART_BODY_FAILURE   136

Definition at line 464 of file pkcs7.h.

#define PKCS7_R_NO_MULTIPART_BOUNDARY   137

Definition at line 465 of file pkcs7.h.

#define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE   115

Definition at line 466 of file pkcs7.h.

#define PKCS7_R_NO_RECIPIENT_MATCHES_KEY   146

Definition at line 467 of file pkcs7.h.

#define PKCS7_R_NO_SIG_CONTENT_TYPE   138

Definition at line 470 of file pkcs7.h.

#define PKCS7_R_NO_SIGNATURES_ON_DATA   123

Definition at line 468 of file pkcs7.h.

#define PKCS7_R_NO_SIGNERS   142

Definition at line 469 of file pkcs7.h.

#define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE   104

Definition at line 471 of file pkcs7.h.

#define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR   124

Definition at line 472 of file pkcs7.h.

#define PKCS7_R_PKCS7_ADD_SIGNER_ERROR   153

Definition at line 473 of file pkcs7.h.

#define PKCS7_R_PKCS7_DATAFINAL   126

Definition at line 474 of file pkcs7.h.

#define PKCS7_R_PKCS7_DATAFINAL_ERROR   125

Definition at line 475 of file pkcs7.h.

#define PKCS7_R_PKCS7_DATASIGN   145

Definition at line 476 of file pkcs7.h.

#define PKCS7_R_PKCS7_PARSE_ERROR   139

Definition at line 477 of file pkcs7.h.

#define PKCS7_R_PKCS7_SIG_PARSE_ERROR   140

Definition at line 478 of file pkcs7.h.

#define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE   127

Definition at line 479 of file pkcs7.h.

#define PKCS7_R_SIG_INVALID_MIME_TYPE   141

Definition at line 484 of file pkcs7.h.

#define PKCS7_R_SIGNATURE_FAILURE   105

Definition at line 480 of file pkcs7.h.

#define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND   128

Definition at line 481 of file pkcs7.h.

#define PKCS7_R_SIGNING_CTRL_FAILURE   147

Definition at line 482 of file pkcs7.h.

#define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE   148

Definition at line 483 of file pkcs7.h.

#define PKCS7_R_SMIME_TEXT_ERROR   129

Definition at line 485 of file pkcs7.h.

#define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE   106

Definition at line 486 of file pkcs7.h.

#define PKCS7_R_UNABLE_TO_FIND_MEM_BIO   107

Definition at line 487 of file pkcs7.h.

#define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST   108

Definition at line 488 of file pkcs7.h.

#define PKCS7_R_UNKNOWN_DIGEST_TYPE   109

Definition at line 489 of file pkcs7.h.

#define PKCS7_R_UNKNOWN_OPERATION   110

Definition at line 490 of file pkcs7.h.

#define PKCS7_R_UNSUPPORTED_CIPHER_TYPE   111

Definition at line 491 of file pkcs7.h.

#define PKCS7_R_UNSUPPORTED_CONTENT_TYPE   112

Definition at line 492 of file pkcs7.h.

#define PKCS7_R_WRONG_CONTENT_TYPE   113

Definition at line 493 of file pkcs7.h.

#define PKCS7_R_WRONG_PKCS7_TYPE   114

Definition at line 494 of file pkcs7.h.

#define PKCS7_REUSE_DIGEST   0x8000

Definition at line 265 of file pkcs7.h.

#define PKCS7_S_BODY   1

Definition at line 183 of file pkcs7.h.

#define PKCS7_S_HEADER   0

Definition at line 182 of file pkcs7.h.

#define PKCS7_S_TAIL   2

Definition at line 184 of file pkcs7.h.

#define PKCS7_set_detached (   p,
 
)    PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)

Definition at line 241 of file pkcs7.h.

#define PKCS7_STREAM   0x1000

Definition at line 262 of file pkcs7.h.

#define PKCS7_TEXT   0x1

Definition at line 250 of file pkcs7.h.

#define PKCS7_type_is_data (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_data)

Definition at line 234 of file pkcs7.h.

#define PKCS7_type_is_digest (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)

Definition at line 239 of file pkcs7.h.

#define PKCS7_type_is_digest (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)

Definition at line 239 of file pkcs7.h.

#define PKCS7_type_is_encrypted (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)

Definition at line 236 of file pkcs7.h.

#define PKCS7_type_is_encrypted (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)

Definition at line 236 of file pkcs7.h.

#define PKCS7_type_is_enveloped (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)

Definition at line 231 of file pkcs7.h.

#define PKCS7_type_is_signed (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)

Definition at line 229 of file pkcs7.h.

#define PKCS7_type_is_signedAndEnveloped (   a)    (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)

Definition at line 232 of file pkcs7.h.

#define SMIME_BINARY   PKCS7_BINARY

Definition at line 276 of file pkcs7.h.

#define SMIME_DETACHED   PKCS7_DETACHED

Definition at line 275 of file pkcs7.h.

#define SMIME_NOATTR   PKCS7_NOATTR

Definition at line 277 of file pkcs7.h.

#define SMIME_NOCERTS   PKCS7_NOCERTS

Definition at line 270 of file pkcs7.h.

#define SMIME_NOCHAIN   PKCS7_NOCHAIN

Definition at line 272 of file pkcs7.h.

#define SMIME_NOINTERN   PKCS7_NOINTERN

Definition at line 273 of file pkcs7.h.

#define SMIME_NOSIGS   PKCS7_NOSIGS

Definition at line 271 of file pkcs7.h.

#define SMIME_NOVERIFY   PKCS7_NOVERIFY

Definition at line 274 of file pkcs7.h.

#define SMIME_TEXT   PKCS7_TEXT

Definition at line 269 of file pkcs7.h.

Typedef Documentation

typedef struct pkcs7_st PKCS7
typedef struct pkcs7_digest_st PKCS7_DIGEST
typedef struct pkcs7_signed_st PKCS7_SIGNED

Function Documentation

BIO* BIO_new_PKCS7 ( BIO out,
PKCS7 p7 
)

Definition at line 66 of file bio_pk7.c.

PKCS7* d2i_PKCS7_bio ( BIO bp,
PKCS7 **  p7 
)

Definition at line 192 of file x_all.c.

PKCS7* d2i_PKCS7_fp ( FILE *  fp,
PKCS7 **  p7 
)

Definition at line 181 of file x_all.c.

void ERR_load_PKCS7_strings ( void  )

Definition at line 177 of file pkcs7err.c.

int i2d_PKCS7_bio ( BIO bp,
PKCS7 p7 
)

Definition at line 197 of file x_all.c.

int i2d_PKCS7_bio_stream ( BIO out,
PKCS7 p7,
BIO in,
int  flags 
)

Definition at line 64 of file pk7_mime.c.

int i2d_PKCS7_fp ( FILE *  fp,
PKCS7 p7 
)

Definition at line 186 of file x_all.c.

int PEM_write_bio_PKCS7_stream ( BIO out,
PKCS7 p7,
BIO in,
int  flags 
)

Definition at line 70 of file pk7_mime.c.

int PKCS7_add0_attrib_signing_time ( PKCS7_SIGNER_INFO si,
ASN1_TIME t 
)

Definition at line 138 of file pk7_attr.c.

int PKCS7_add1_attrib_digest ( PKCS7_SIGNER_INFO si,
const unsigned char *  md,
int  mdlen 
)

Definition at line 150 of file pk7_attr.c.

int PKCS7_add_attrib_content_type ( PKCS7_SIGNER_INFO si,
ASN1_OBJECT coid 
)

Definition at line 128 of file pk7_attr.c.

int PKCS7_add_attrib_smimecap ( PKCS7_SIGNER_INFO si,
STACK_OF(X509_ALGOR)*  cap 
)

Definition at line 69 of file pk7_attr.c.

int PKCS7_add_attribute ( PKCS7_SIGNER_INFO p7si,
int  nid,
int  atrtype,
void value 
)

Definition at line 1248 of file pk7_doit.c.

int PKCS7_add_certificate ( PKCS7 p7,
X509 x509 
)

Definition at line 295 of file pk7_lib.c.

int PKCS7_add_crl ( PKCS7 p7,
X509_CRL x509 
)

Definition at line 330 of file pk7_lib.c.

PKCS7_RECIP_INFO* PKCS7_add_recipient ( PKCS7 p7,
X509 x509 
)

Definition at line 491 of file pk7_lib.c.

int PKCS7_add_recipient_info ( PKCS7 p7,
PKCS7_RECIP_INFO ri 
)

Definition at line 505 of file pk7_lib.c.

PKCS7_SIGNER_INFO* PKCS7_add_signature ( PKCS7 p7,
X509 x509,
EVP_PKEY pkey,
const EVP_MD dgst 
)

Definition at line 413 of file pk7_lib.c.

int PKCS7_add_signed_attribute ( PKCS7_SIGNER_INFO p7si,
int  nid,
int  type,
void data 
)

Definition at line 1242 of file pk7_doit.c.

int PKCS7_add_signer ( PKCS7 p7,
PKCS7_SIGNER_INFO p7i 
)

Definition at line 236 of file pk7_lib.c.

X509* PKCS7_cert_from_signer_info ( PKCS7 p7,
PKCS7_SIGNER_INFO si 
)

Definition at line 581 of file pk7_lib.c.

int PKCS7_content_new ( PKCS7 p7,
int  nid 
)

Definition at line 115 of file pk7_lib.c.

long PKCS7_ctrl ( PKCS7 p7,
int  cmd,
long  larg,
char *  parg 
)

Definition at line 65 of file pk7_lib.c.

BIO* PKCS7_dataDecode ( PKCS7 p7,
EVP_PKEY pkey,
BIO in_bio,
X509 pcert 
)

Definition at line 420 of file pk7_doit.c.

int PKCS7_dataFinal ( PKCS7 p7,
BIO bio 
)

Definition at line 739 of file pk7_doit.c.

BIO* PKCS7_dataInit ( PKCS7 p7,
BIO bio 
)

Definition at line 263 of file pk7_doit.c.

int PKCS7_dataVerify ( X509_STORE cert_store,
X509_STORE_CTX ctx,
BIO bio,
PKCS7 p7,
PKCS7_SIGNER_INFO si 
)

Definition at line 960 of file pk7_doit.c.

int PKCS7_decrypt ( PKCS7 p7,
EVP_PKEY pkey,
X509 cert,
BIO data,
int  flags 
)

Definition at line 534 of file pk7_smime.c.

ASN1_OCTET_STRING* PKCS7_digest_from_attributes ( STACK_OF(X509_ATTRIBUTE)*  sk)

Definition at line 1195 of file pk7_doit.c.

PKCS7* PKCS7_dup ( PKCS7 p7)
PKCS7* PKCS7_encrypt ( STACK_OF(X509)*  certs,
BIO in,
const EVP_CIPHER cipher,
int  flags 
)

Definition at line 492 of file pk7_smime.c.

int PKCS7_final ( PKCS7 p7,
BIO data,
int  flags 
)

Definition at line 115 of file pk7_smime.c.

ASN1_TYPE* PKCS7_get_attribute ( PKCS7_SIGNER_INFO si,
int  nid 
)

Definition at line 1168 of file pk7_doit.c.

PKCS7_ISSUER_AND_SERIAL* PKCS7_get_issuer_and_serial ( PKCS7 p7,
int  idx 
)

Definition at line 1143 of file pk7_doit.c.

ASN1_TYPE* PKCS7_get_signed_attribute ( PKCS7_SIGNER_INFO si,
int  nid 
)

Definition at line 1163 of file pk7_doit.c.

int PKCS7_ISSUER_AND_SERIAL_digest ( PKCS7_ISSUER_AND_SERIAL data,
const EVP_MD type,
unsigned char *  md,
unsigned int *  len 
)

Definition at line 416 of file x_all.c.

void PKCS7_RECIP_INFO_get0_alg ( PKCS7_RECIP_INFO ri,
X509_ALGOR **  penc 
)

Definition at line 485 of file pk7_lib.c.

int PKCS7_RECIP_INFO_set ( PKCS7_RECIP_INFO p7i,
X509 x509 
)

Definition at line 529 of file pk7_lib.c.

int PKCS7_set0_type_other ( PKCS7 p7,
int  type,
ASN1_TYPE other 
)

Definition at line 229 of file pk7_lib.c.

int PKCS7_set_attributes ( PKCS7_SIGNER_INFO p7si,
STACK_OF(X509_ATTRIBUTE)*  sk 
)

Definition at line 1222 of file pk7_doit.c.

int PKCS7_set_cipher ( PKCS7 p7,
const EVP_CIPHER cipher 
)

Definition at line 591 of file pk7_lib.c.

int PKCS7_set_content ( PKCS7 p7,
PKCS7 p7_data 
)

Definition at line 129 of file pk7_lib.c.

int PKCS7_set_digest ( PKCS7 p7,
const EVP_MD md 
)

Definition at line 442 of file pk7_lib.c.

int PKCS7_set_signed_attributes ( PKCS7_SIGNER_INFO p7si,
STACK_OF(X509_ATTRIBUTE)*  sk 
)

Definition at line 1202 of file pk7_doit.c.

int PKCS7_set_type ( PKCS7 p7,
int  type 
)

Definition at line 159 of file pk7_lib.c.

PKCS7* PKCS7_sign ( X509 signcert,
EVP_PKEY pkey,
STACK_OF(X509)*  certs,
BIO data,
int  flags 
)

Definition at line 68 of file pk7_smime.c.

PKCS7_SIGNER_INFO* PKCS7_sign_add_signer ( PKCS7 p7,
X509 signcert,
EVP_PKEY pkey,
const EVP_MD md,
int  flags 
)

Definition at line 161 of file pk7_smime.c.

int PKCS7_signatureVerify ( BIO bio,
PKCS7 p7,
PKCS7_SIGNER_INFO si,
X509 x509 
)

Definition at line 1014 of file pk7_doit.c.

void PKCS7_SIGNER_INFO_get0_algs ( PKCS7_SIGNER_INFO si,
EVP_PKEY **  pk,
X509_ALGOR **  pdig,
X509_ALGOR **  psig 
)

Definition at line 474 of file pk7_lib.c.

int PKCS7_SIGNER_INFO_set ( PKCS7_SIGNER_INFO p7i,
X509 x509,
EVP_PKEY pkey,
const EVP_MD dgst 
)

Definition at line 366 of file pk7_lib.c.

int PKCS7_SIGNER_INFO_sign ( PKCS7_SIGNER_INFO si)

Definition at line 900 of file pk7_doit.c.

int PKCS7_simple_smimecap ( STACK_OF(X509_ALGOR)*  sk,
int  nid,
int  arg 
)

Definition at line 97 of file pk7_attr.c.

int PKCS7_stream ( unsigned char ***  boundary,
PKCS7 p7 
)

Definition at line 621 of file pk7_lib.c.

int PKCS7_verify ( PKCS7 p7,
STACK_OF(X509)*  certs,
X509_STORE store,
BIO indata,
BIO out,
int  flags 
)

Definition at line 266 of file pk7_smime.c.

PKCS7* SMIME_read_PKCS7 ( BIO bio,
BIO **  bcont 
)

Definition at line 94 of file pk7_mime.c.

int SMIME_write_PKCS7 ( BIO bio,
PKCS7 p7,
BIO data,
int  flags 
)

Definition at line 77 of file pk7_mime.c.

STACK_OF ( PKCS7_SIGNER_INFO  )

Definition at line 460 of file pk7_lib.c.

STACK_OF ( X509  )

Definition at line 1214 of file apps.c.

STACK_OF ( X509_ALGOR  )

Definition at line 82 of file pk7_attr.c.

Variable Documentation

int flags

Definition at line 369 of file pkcs7.h.