OLD | NEW |
1 /* crypto/cms/cms.h */ | 1 /* crypto/cms/cms.h */ |
2 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 * project. | 3 * project. |
4 */ | 4 */ |
5 /* ==================================================================== | 5 /* ==================================================================== |
6 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. | 6 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 typedef struct CMS_ContentInfo_st CMS_ContentInfo; | 69 typedef struct CMS_ContentInfo_st CMS_ContentInfo; |
70 typedef struct CMS_SignerInfo_st CMS_SignerInfo; | 70 typedef struct CMS_SignerInfo_st CMS_SignerInfo; |
71 typedef struct CMS_CertificateChoices CMS_CertificateChoices; | 71 typedef struct CMS_CertificateChoices CMS_CertificateChoices; |
72 typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice; | 72 typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice; |
73 typedef struct CMS_RecipientInfo_st CMS_RecipientInfo; | 73 typedef struct CMS_RecipientInfo_st CMS_RecipientInfo; |
74 typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest; | 74 typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest; |
75 typedef struct CMS_Receipt_st CMS_Receipt; | 75 typedef struct CMS_Receipt_st CMS_Receipt; |
76 | 76 |
77 DECLARE_STACK_OF(CMS_SignerInfo) | 77 DECLARE_STACK_OF(CMS_SignerInfo) |
78 DECLARE_STACK_OF(GENERAL_NAMES) | 78 DECLARE_STACK_OF(GENERAL_NAMES) |
79 DECLARE_ASN1_FUNCTIONS_const(CMS_ContentInfo) | 79 DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo) |
80 DECLARE_ASN1_FUNCTIONS_const(CMS_ReceiptRequest) | 80 DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest) |
| 81 DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo) |
81 | 82 |
82 #define CMS_SIGNERINFO_ISSUER_SERIAL 0 | 83 #define CMS_SIGNERINFO_ISSUER_SERIAL 0 |
83 #define CMS_SIGNERINFO_KEYIDENTIFIER 1 | 84 #define CMS_SIGNERINFO_KEYIDENTIFIER 1 |
84 | 85 |
85 #define CMS_RECIPINFO_TRANS 0 | 86 #define CMS_RECIPINFO_TRANS 0 |
86 #define CMS_RECIPINFO_AGREE 1 | 87 #define CMS_RECIPINFO_AGREE 1 |
87 #define CMS_RECIPINFO_KEK 2 | 88 #define CMS_RECIPINFO_KEK 2 |
88 #define CMS_RECIPINFO_PASS 3 | 89 #define CMS_RECIPINFO_PASS 3 |
89 #define CMS_RECIPINFO_OTHER 4 | 90 #define CMS_RECIPINFO_OTHER 4 |
90 | 91 |
(...skipping 26 matching lines...) Expand all Loading... |
117 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); | 118 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); |
118 | 119 |
119 ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms); | 120 ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms); |
120 int CMS_is_detached(CMS_ContentInfo *cms); | 121 int CMS_is_detached(CMS_ContentInfo *cms); |
121 int CMS_set_detached(CMS_ContentInfo *cms, int detached); | 122 int CMS_set_detached(CMS_ContentInfo *cms, int detached); |
122 | 123 |
123 #ifdef HEADER_PEM_H | 124 #ifdef HEADER_PEM_H |
124 DECLARE_PEM_rw_const(CMS, CMS_ContentInfo) | 125 DECLARE_PEM_rw_const(CMS, CMS_ContentInfo) |
125 #endif | 126 #endif |
126 | 127 |
| 128 int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms); |
127 CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms); | 129 CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms); |
128 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); | 130 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); |
129 | 131 |
| 132 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); |
| 133 int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags); |
| 134 int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags)
; |
130 CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont); | 135 CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont); |
131 int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags); | 136 int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags); |
132 | 137 |
133 int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags); | 138 int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags); |
134 | 139 |
135 CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, | 140 CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, |
136 BIO *data, unsigned int flags); | 141 BIO *data, unsigned int flags); |
137 | 142 |
138 CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, | 143 CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, |
139 X509 *signcert, EVP_PKEY *pkey, | 144 X509 *signcert, EVP_PKEY *pkey, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid); | 228 int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid); |
224 const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms); | 229 const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms); |
225 | 230 |
226 CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms); | 231 CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms); |
227 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); | 232 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); |
228 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); | 233 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); |
229 STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); | 234 STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); |
230 | 235 |
231 CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms); | 236 CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms); |
232 int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); | 237 int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); |
| 238 int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl); |
233 STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms); | 239 STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms); |
234 | 240 |
235 int CMS_SignedData_init(CMS_ContentInfo *cms); | 241 int CMS_SignedData_init(CMS_ContentInfo *cms); |
236 CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, | 242 CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, |
237 X509 *signer, EVP_PKEY *pk, const EVP_MD *md, | 243 X509 *signer, EVP_PKEY *pk, const EVP_MD *md, |
238 unsigned int flags); | 244 unsigned int flags); |
239 STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms); | 245 STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms); |
240 | 246 |
241 void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer); | 247 void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer); |
242 int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, | 248 int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 #define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE 155 | 470 #define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE 155 |
465 #define CMS_R_UNSUPPORTED_TYPE 156 | 471 #define CMS_R_UNSUPPORTED_TYPE 156 |
466 #define CMS_R_UNWRAP_ERROR 157 | 472 #define CMS_R_UNWRAP_ERROR 157 |
467 #define CMS_R_VERIFICATION_FAILURE 158 | 473 #define CMS_R_VERIFICATION_FAILURE 158 |
468 #define CMS_R_WRAP_ERROR 159 | 474 #define CMS_R_WRAP_ERROR 159 |
469 | 475 |
470 #ifdef __cplusplus | 476 #ifdef __cplusplus |
471 } | 477 } |
472 #endif | 478 #endif |
473 #endif | 479 #endif |
OLD | NEW |