cms.h 15.6 KB
Newer Older
D
Dr. Stephen Henson 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
/* crypto/cms/cms.h */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
 * project.
 */
/* ====================================================================
 * Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
 *
 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    licensing@OpenSSL.org.
 *
 * 5. Products derived from this software may not be called "OpenSSL"
 *    nor may "OpenSSL" appear in their names without prior written
 *    permission of the OpenSSL Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the OpenSSL Project
 *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
 *
 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 */


#ifndef HEADER_CMS_H
#define HEADER_CMS_H

#include <openssl/x509.h>

#ifdef OPENSSL_NO_CMS
#error CMS is disabled.
#endif

#ifdef __cplusplus
extern "C" {
#endif


typedef struct CMS_ContentInfo_st CMS_ContentInfo;
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
73
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
D
Dr. Stephen Henson 已提交
74 75 76 77 78 79 80 81

DECLARE_STACK_OF(CMS_SignerInfo)
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)

#define CMS_SIGNERINFO_ISSUER_SERIAL	0
#define CMS_SIGNERINFO_KEYIDENTIFIER	1

82 83 84 85 86 87
#define CMS_RECIPINFO_TRANS		0
#define CMS_RECIPINFO_AGREE		1
#define CMS_RECIPINFO_KEK		2
#define CMS_RECIPINFO_PASS		3
#define CMS_RECIPINFO_OTHER		4

D
Dr. Stephen Henson 已提交
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
/* S/MIME related flags */

#define CMS_TEXT			0x1
#define CMS_NOCERTS			0x2
#define CMS_NO_CONTENT_VERIFY		0x4
#define CMS_NO_ATTR_VERIFY		0x8
#define CMS_NOSIGS			\
			(CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
#define CMS_NOINTERN			0x10
#define CMS_NO_SIGNER_CERT_VERIFY	0x20
#define CMS_NOVERIFY			0x20
#define CMS_DETACHED			0x40
#define CMS_BINARY			0x80
#define CMS_NOATTR			0x100
#define	CMS_NOSMIMECAP			0x200
#define CMS_NOOLDMIMETYPE		0x400
#define CMS_CRLFEOL			0x800
#define CMS_STREAM			0x1000
#define CMS_NOCRL			0x2000
#define CMS_PARTIAL			0x4000
#define CMS_REUSE_DIGEST		0x8000
#define CMS_USE_KEYID			0x10000

const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms);

BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);

ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
int CMS_is_detached(CMS_ContentInfo *cms);
int CMS_set_detached(CMS_ContentInfo *cms, int detached);

#ifdef HEADER_PEM_H
DECLARE_PEM_rw_const(CMS, CMS_ContentInfo)
#endif

int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);

BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);

int CMS_final(CMS_ContentInfo *cms, BIO *data, int flags);

CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
						BIO *data, unsigned int flags);

int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);

int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
							unsigned int flags);
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
							unsigned int flags);

147 148 149 150
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
				const unsigned char *key, size_t keylen,
				BIO *dcont, BIO *out, unsigned int flags);

151 152 153 154
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
					const unsigned char *key, size_t keylen,
					unsigned int flags);

155
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
156 157
				const unsigned char *key, size_t keylen);

D
Dr. Stephen Henson 已提交
158 159 160 161 162 163 164 165
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
		 X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);

STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);

CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
				const EVP_CIPHER *cipher, unsigned int flags);

166 167
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
				BIO *data, BIO *dcont,
D
Dr. Stephen Henson 已提交
168 169
				unsigned int flags);

170 171
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
172 173 174
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
					X509 *recip, unsigned int flags);
175 176 177 178 179 180 181 182 183 184 185
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
					EVP_PKEY **pk, X509 **recip,
					X509_ALGOR **palg);
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
					ASN1_OCTET_STRING **keyid,
					X509_NAME **issuer, ASN1_INTEGER **sno);

int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,
			       EVP_PKEY *pkey);
	
D
Dr. Stephen Henson 已提交
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
							unsigned int flags);
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);

int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);

CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);

CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);

int CMS_SignedData_init(CMS_ContentInfo *cms);
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
			X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
			unsigned int flags);
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);

void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
					ASN1_OCTET_STRING **keyid,
					X509_NAME **issuer, ASN1_INTEGER **sno);
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
					unsigned int flags);
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, X509 **signer,
					X509_ALGOR **pdig, X509_ALGOR **psig);
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);

int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
				int algnid, int keysize);
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);

int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
			  int lastpos);
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,
			  int lastpos);
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
			const ASN1_OBJECT *obj, int type,
			const void *bytes, int len);
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
			int nid, int type,
			const void *bytes, int len);
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
			const char *attrname, int type,
			const void *bytes, int len);
void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
					int lastpos, int type);

int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
			  int lastpos);
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,
			  int lastpos);
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
			const ASN1_OBJECT *obj, int type,
			const void *bytes, int len);
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
			int nid, int type,
			const void *bytes, int len);
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
			const char *attrname, int type,
			const void *bytes, int len);
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
					int lastpos, int type);

/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
 * made after this point may be overwritten when the script is next run.
 */
void ERR_load_CMS_strings(void);

/* Error codes for the CMS functions. */

/* Function codes. */
275
#define CMS_F_CHECK_CONTENT				 151
276
#define CMS_F_CMS_ADD0_RECIPIENT_KEY			 157
D
Dr. Stephen Henson 已提交
277 278 279
#define CMS_F_CMS_ADD1_RECIPIENT_CERT			 99
#define CMS_F_CMS_ADD1_SIGNER				 100
#define CMS_F_CMS_ADD1_SIGNINGTIME			 101
280
#define CMS_F_CMS_BIO_TO_ENCRYPTEDCONTENT		 137
281
#define CMS_F_CMS_BIO_TO_ENCRYPTEDCONTENT_BIO		 142
D
Dr. Stephen Henson 已提交
282 283 284 285 286 287 288 289
#define CMS_F_CMS_COMPRESS				 102
#define CMS_F_CMS_COMPRESSEDDATA_CREATE			 103
#define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO		 104
#define CMS_F_CMS_COPY_CONTENT				 105
#define CMS_F_CMS_COPY_MESSAGEDIGEST			 106
#define CMS_F_CMS_DATA					 107
#define CMS_F_CMS_DATAFINAL				 108
#define CMS_F_CMS_DATAINIT				 109
290
#define CMS_F_CMS_DECRYPT				 152
291 292
#define CMS_F_CMS_DECRYPTEDCONTENT_DECRYPT_BIO		 145
#define CMS_F_CMS_DECRYPTEDCONTENT_ENCRYPT_BIO		 143
D
Dr. Stephen Henson 已提交
293 294 295 296
#define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX		 110
#define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO		 111
#define CMS_F_CMS_DIGESTEDDATA_DO_FINAL			 112
#define CMS_F_CMS_DIGEST_VERIFY				 113
297
#define CMS_F_CMS_ENCRYPT				 154
298 299 300
#define CMS_F_CMS_ENCRYPTEDCONTENT_DECRYPT_BIO		 146
#define CMS_F_CMS_ENCRYPTEDCONTENT_ENCRYPT_BIO		 144
#define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO		 148
301
#define CMS_F_CMS_ENCRYPTEDCONTENT_TO_BIO		 138
302
#define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT			 140
303
#define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT			 149
304 305
#define CMS_F_CMS_ENCRYPTEDDATA_INIT_BIO		 147
#define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY		 141
306
#define CMS_F_CMS_ENCRYPTED_DATA_DECRYPT		 139
307 308
#define CMS_F_CMS_ENVELOPEDDATA_CREATE			 153
#define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO		 156
D
Dr. Stephen Henson 已提交
309 310 311 312 313 314 315 316
#define CMS_F_CMS_ENVELOPED_DATA_INIT			 114
#define CMS_F_CMS_FINAL					 115
#define CMS_F_CMS_GET0_CERTIFICATE_CHOICES		 116
#define CMS_F_CMS_GET0_CONTENT				 117
#define CMS_F_CMS_GET0_ECONTENT_TYPE			 118
#define CMS_F_CMS_GET0_ENVELOPED			 119
#define CMS_F_CMS_GET0_REVOCATION_CHOICES		 120
#define CMS_F_CMS_GET0_SIGNED				 121
317
#define CMS_F_CMS_RECIPIENTINFO_DECRYPT			 150
318
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID		 158
D
Dr. Stephen Henson 已提交
319
#define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP		 122
320
#define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT		 155
D
Dr. Stephen Henson 已提交
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
#define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS		 123
#define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID	 124
#define CMS_F_CMS_SET1_SIGNERIDENTIFIER			 125
#define CMS_F_CMS_SET_DETACHED				 126
#define CMS_F_CMS_SIGN					 127
#define CMS_F_CMS_SIGNED_DATA_INIT			 128
#define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN		 129
#define CMS_F_CMS_SIGNERINFO_SIGN			 130
#define CMS_F_CMS_SIGNERINFO_VERIFY			 131
#define CMS_F_CMS_SIGNERINFO_VERIFY_CERT		 132
#define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT		 133
#define CMS_F_CMS_STREAM				 134
#define CMS_F_CMS_UNCOMPRESS				 135
#define CMS_F_CMS_VERIFY				 136

/* Reason codes. */
#define CMS_R_ADD_SIGNER_ERROR				 99
#define CMS_R_CERTIFICATE_VERIFY_ERROR			 100
339 340
#define CMS_R_CIPHER_INITIALISATION_ERROR		 138
#define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR	 139
D
Dr. Stephen Henson 已提交
341
#define CMS_R_CMS_DATAFINAL_ERROR			 101
342
#define CMS_R_CMS_LIB					 145
D
Dr. Stephen Henson 已提交
343 344 345 346 347 348 349 350 351
#define CMS_R_CONTENT_NOT_FOUND				 102
#define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA		 103
#define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA		 104
#define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA		 105
#define CMS_R_CONTENT_VERIFY_ERROR			 106
#define CMS_R_CTRL_ERROR				 107
#define CMS_R_CTRL_FAILURE				 108
#define CMS_R_ERROR_GETTING_PUBLIC_KEY			 109
#define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE	 110
352
#define CMS_R_ERROR_SETTING_RECIPIENTINFO		 150
353
#define CMS_R_INVALID_KEY_LENGTH			 140
D
Dr. Stephen Henson 已提交
354 355 356
#define CMS_R_MD_BIO_INIT_ERROR				 111
#define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH	 112
#define CMS_R_MESSAGEDIGEST_WRONG_LENGTH		 113
357
#define CMS_R_NOT_ENCRYPTED_DATA			 143
358
#define CMS_R_NOT_KEK					 152
D
Dr. Stephen Henson 已提交
359 360
#define CMS_R_NOT_KEY_TRANSPORT				 114
#define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE		 115
361
#define CMS_R_NO_CIPHER					 144
D
Dr. Stephen Henson 已提交
362 363 364
#define CMS_R_NO_CONTENT				 116
#define CMS_R_NO_DEFAULT_DIGEST				 117
#define CMS_R_NO_DIGEST_SET				 118
365
#define CMS_R_NO_KEY					 148
D
Dr. Stephen Henson 已提交
366
#define CMS_R_NO_MATCHING_DIGEST			 119
367
#define CMS_R_NO_MATCHING_RECIPIENT			 147
D
Dr. Stephen Henson 已提交
368 369 370 371
#define CMS_R_NO_PRIVATE_KEY				 120
#define CMS_R_NO_PUBLIC_KEY				 121
#define CMS_R_NO_SIGNERS				 122
#define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE	 123
372
#define CMS_R_RECIPIENT_ERROR				 149
D
Dr. Stephen Henson 已提交
373 374 375 376 377 378 379
#define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND		 124
#define CMS_R_SIGNFINAL_ERROR				 125
#define CMS_R_SMIME_TEXT_ERROR				 126
#define CMS_R_STORE_INIT_ERROR				 127
#define CMS_R_TYPE_NOT_COMPRESSED_DATA			 128
#define CMS_R_TYPE_NOT_DATA				 129
#define CMS_R_TYPE_NOT_DIGESTED_DATA			 130
380
#define CMS_R_TYPE_NOT_ENCRYPTED_DATA			 142
381
#define CMS_R_TYPE_NOT_ENVELOPED_DATA			 146
D
Dr. Stephen Henson 已提交
382
#define CMS_R_UNABLE_TO_FINALIZE_CONTEXT		 131
383
#define CMS_R_UNKNOWN_CIPHER				 141
D
Dr. Stephen Henson 已提交
384 385 386 387
#define CMS_R_UNKNOWN_DIGEST_ALGORIHM			 132
#define CMS_R_UNKNOWN_ID				 133
#define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM		 134
#define CMS_R_UNSUPPORTED_CONTENT_TYPE			 135
388
#define CMS_R_UNSUPPORTED_KEK_ALGORITHM			 153
389
#define CMS_R_UNSUPPORTED_RECIPIENT_TYPE		 151
D
Dr. Stephen Henson 已提交
390 391 392 393 394 395 396
#define CMS_R_UNSUPPORTED_TYPE				 136
#define CMS_R_VERIFICATION_FAILURE			 137

#ifdef  __cplusplus
}
#endif
#endif