cms.h revision 296465
1/* crypto/cms/cms.h */ 2/* 3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 4 * project. 5 */ 6/* ==================================================================== 7 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in 18 * the documentation and/or other materials provided with the 19 * distribution. 20 * 21 * 3. All advertising materials mentioning features or use of this 22 * software must display the following acknowledgment: 23 * "This product includes software developed by the OpenSSL Project 24 * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 * 26 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 * endorse or promote products derived from this software without 28 * prior written permission. For written permission, please contact 29 * licensing@OpenSSL.org. 30 * 31 * 5. Products derived from this software may not be called "OpenSSL" 32 * nor may "OpenSSL" appear in their names without prior written 33 * permission of the OpenSSL Project. 34 * 35 * 6. Redistributions of any form whatsoever must retain the following 36 * acknowledgment: 37 * "This product includes software developed by the OpenSSL Project 38 * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 * 40 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 * OF THE POSSIBILITY OF SUCH DAMAGE. 52 * ==================================================================== 53 */ 54 55#ifndef HEADER_CMS_H 56# define HEADER_CMS_H 57 58# include <openssl/x509.h> 59 60# ifdef OPENSSL_NO_CMS 61# error CMS is disabled. 62# endif 63 64#ifdef __cplusplus 65extern "C" { 66#endif 67 68typedef struct CMS_ContentInfo_st CMS_ContentInfo; 69typedef struct CMS_SignerInfo_st CMS_SignerInfo; 70typedef struct CMS_CertificateChoices CMS_CertificateChoices; 71typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice; 72typedef struct CMS_RecipientInfo_st CMS_RecipientInfo; 73typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest; 74typedef struct CMS_Receipt_st CMS_Receipt; 75 76DECLARE_STACK_OF(CMS_SignerInfo) 77DECLARE_STACK_OF(GENERAL_NAMES) 78DECLARE_ASN1_FUNCTIONS_const(CMS_ContentInfo) 79DECLARE_ASN1_FUNCTIONS_const(CMS_ReceiptRequest) 80 81# define CMS_SIGNERINFO_ISSUER_SERIAL 0 82# define CMS_SIGNERINFO_KEYIDENTIFIER 1 83 84# define CMS_RECIPINFO_TRANS 0 85# define CMS_RECIPINFO_AGREE 1 86# define CMS_RECIPINFO_KEK 2 87# define CMS_RECIPINFO_PASS 3 88# define CMS_RECIPINFO_OTHER 4 89 90/* S/MIME related flags */ 91 92# define CMS_TEXT 0x1 93# define CMS_NOCERTS 0x2 94# define CMS_NO_CONTENT_VERIFY 0x4 95# define CMS_NO_ATTR_VERIFY 0x8 96# define CMS_NOSIGS \ 97 (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY) 98# define CMS_NOINTERN 0x10 99# define CMS_NO_SIGNER_CERT_VERIFY 0x20 100# define CMS_NOVERIFY 0x20 101# define CMS_DETACHED 0x40 102# define CMS_BINARY 0x80 103# define CMS_NOATTR 0x100 104# define CMS_NOSMIMECAP 0x200 105# define CMS_NOOLDMIMETYPE 0x400 106# define CMS_CRLFEOL 0x800 107# define CMS_STREAM 0x1000 108# define CMS_NOCRL 0x2000 109# define CMS_PARTIAL 0x4000 110# define CMS_REUSE_DIGEST 0x8000 111# define CMS_USE_KEYID 0x10000 112# define CMS_DEBUG_DECRYPT 0x20000 113 114const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms); 115 116BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont); 117int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); 118 119ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms); 120int CMS_is_detached(CMS_ContentInfo *cms); 121int CMS_set_detached(CMS_ContentInfo *cms, int detached); 122 123# ifdef HEADER_PEM_H 124DECLARE_PEM_rw_const(CMS, CMS_ContentInfo) 125# endif 126CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms); 127int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); 128 129CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont); 130int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags); 131 132int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, 133 unsigned int flags); 134 135CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, 136 STACK_OF(X509) *certs, BIO *data, 137 unsigned int flags); 138 139CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, 140 X509 *signcert, EVP_PKEY *pkey, 141 STACK_OF(X509) *certs, unsigned int flags); 142 143int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags); 144CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags); 145 146int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, 147 unsigned int flags); 148CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md, 149 unsigned int flags); 150 151int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, 152 const unsigned char *key, size_t keylen, 153 BIO *dcont, BIO *out, unsigned int flags); 154 155CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, 156 const unsigned char *key, 157 size_t keylen, unsigned int flags); 158 159int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, 160 const unsigned char *key, size_t keylen); 161 162int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, 163 X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags); 164 165int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, 166 STACK_OF(X509) *certs, 167 X509_STORE *store, unsigned int flags); 168 169STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms); 170 171CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in, 172 const EVP_CIPHER *cipher, unsigned int flags); 173 174int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert, 175 BIO *dcont, BIO *out, unsigned int flags); 176 177int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert); 178int CMS_decrypt_set1_key(CMS_ContentInfo *cms, 179 unsigned char *key, size_t keylen, 180 unsigned char *id, size_t idlen); 181 182STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms); 183int CMS_RecipientInfo_type(CMS_RecipientInfo *ri); 184CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher); 185CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms, 186 X509 *recip, unsigned int flags); 187int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey); 188int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert); 189int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, 190 EVP_PKEY **pk, X509 **recip, 191 X509_ALGOR **palg); 192int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, 193 ASN1_OCTET_STRING **keyid, 194 X509_NAME **issuer, 195 ASN1_INTEGER **sno); 196 197CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, 198 unsigned char *key, size_t keylen, 199 unsigned char *id, size_t idlen, 200 ASN1_GENERALIZEDTIME *date, 201 ASN1_OBJECT *otherTypeId, 202 ASN1_TYPE *otherType); 203 204int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, 205 X509_ALGOR **palg, 206 ASN1_OCTET_STRING **pid, 207 ASN1_GENERALIZEDTIME **pdate, 208 ASN1_OBJECT **potherid, 209 ASN1_TYPE **pothertype); 210 211int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, 212 unsigned char *key, size_t keylen); 213 214int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri, 215 const unsigned char *id, size_t idlen); 216 217int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri); 218 219int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, 220 unsigned int flags); 221CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags); 222 223int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid); 224const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms); 225 226CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms); 227int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); 228int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); 229STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); 230 231CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms); 232int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); 233STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms); 234 235int CMS_SignedData_init(CMS_ContentInfo *cms); 236CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, 237 X509 *signer, EVP_PKEY *pk, const EVP_MD *md, 238 unsigned int flags); 239STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms); 240 241void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer); 242int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, 243 ASN1_OCTET_STRING **keyid, 244 X509_NAME **issuer, ASN1_INTEGER **sno); 245int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert); 246int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs, 247 unsigned int flags); 248void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, 249 X509 **signer, X509_ALGOR **pdig, 250 X509_ALGOR **psig); 251int CMS_SignerInfo_sign(CMS_SignerInfo *si); 252int CMS_SignerInfo_verify(CMS_SignerInfo *si); 253int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain); 254 255int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs); 256int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, 257 int algnid, int keysize); 258int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap); 259 260int CMS_signed_get_attr_count(const CMS_SignerInfo *si); 261int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, 262 int lastpos); 263int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, 264 int lastpos); 265X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc); 266X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc); 267int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); 268int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, 269 const ASN1_OBJECT *obj, int type, 270 const void *bytes, int len); 271int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, 272 int nid, int type, 273 const void *bytes, int len); 274int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, 275 const char *attrname, int type, 276 const void *bytes, int len); 277void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, 278 int lastpos, int type); 279 280int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si); 281int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, 282 int lastpos); 283int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, 284 int lastpos); 285X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc); 286X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc); 287int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); 288int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, 289 const ASN1_OBJECT *obj, int type, 290 const void *bytes, int len); 291int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, 292 int nid, int type, 293 const void *bytes, int len); 294int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, 295 const char *attrname, int type, 296 const void *bytes, int len); 297void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, 298 int lastpos, int type); 299 300# ifdef HEADER_X509V3_H 301 302int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr); 303CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen, 304 int allorfirst, 305 STACK_OF(GENERAL_NAMES) 306 *receiptList, STACK_OF(GENERAL_NAMES) 307 *receiptsTo); 308int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr); 309void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, 310 ASN1_STRING **pcid, 311 int *pallorfirst, 312 STACK_OF(GENERAL_NAMES) **plist, 313 STACK_OF(GENERAL_NAMES) **prto); 314 315# endif 316 317/* BEGIN ERROR CODES */ 318/* 319 * The following lines are auto generated by the script mkerr.pl. Any changes 320 * made after this point may be overwritten when the script is next run. 321 */ 322void ERR_load_CMS_strings(void); 323 324/* Error codes for the CMS functions. */ 325 326/* Function codes. */ 327# define CMS_F_CHECK_CONTENT 99 328# define CMS_F_CMS_ADD0_CERT 164 329# define CMS_F_CMS_ADD0_RECIPIENT_KEY 100 330# define CMS_F_CMS_ADD1_RECEIPTREQUEST 158 331# define CMS_F_CMS_ADD1_RECIPIENT_CERT 101 332# define CMS_F_CMS_ADD1_SIGNER 102 333# define CMS_F_CMS_ADD1_SIGNINGTIME 103 334# define CMS_F_CMS_COMPRESS 104 335# define CMS_F_CMS_COMPRESSEDDATA_CREATE 105 336# define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 106 337# define CMS_F_CMS_COPY_CONTENT 107 338# define CMS_F_CMS_COPY_MESSAGEDIGEST 108 339# define CMS_F_CMS_DATA 109 340# define CMS_F_CMS_DATAFINAL 110 341# define CMS_F_CMS_DATAINIT 111 342# define CMS_F_CMS_DECRYPT 112 343# define CMS_F_CMS_DECRYPT_SET1_KEY 113 344# define CMS_F_CMS_DECRYPT_SET1_PKEY 114 345# define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 115 346# define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 116 347# define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 117 348# define CMS_F_CMS_DIGEST_VERIFY 118 349# define CMS_F_CMS_ENCODE_RECEIPT 161 350# define CMS_F_CMS_ENCRYPT 119 351# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120 352# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121 353# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122 354# define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 123 355# define CMS_F_CMS_ENVELOPEDDATA_CREATE 124 356# define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 125 357# define CMS_F_CMS_ENVELOPED_DATA_INIT 126 358# define CMS_F_CMS_FINAL 127 359# define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 128 360# define CMS_F_CMS_GET0_CONTENT 129 361# define CMS_F_CMS_GET0_ECONTENT_TYPE 130 362# define CMS_F_CMS_GET0_ENVELOPED 131 363# define CMS_F_CMS_GET0_REVOCATION_CHOICES 132 364# define CMS_F_CMS_GET0_SIGNED 133 365# define CMS_F_CMS_MSGSIGDIGEST_ADD1 162 366# define CMS_F_CMS_RECEIPTREQUEST_CREATE0 159 367# define CMS_F_CMS_RECEIPT_VERIFY 160 368# define CMS_F_CMS_RECIPIENTINFO_DECRYPT 134 369# define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 135 370# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 136 371# define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 137 372# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 138 373# define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 139 374# define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 140 375# define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 141 376# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 142 377# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 143 378# define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 144 379# define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 145 380# define CMS_F_CMS_SET1_SIGNERIDENTIFIER 146 381# define CMS_F_CMS_SET_DETACHED 147 382# define CMS_F_CMS_SIGN 148 383# define CMS_F_CMS_SIGNED_DATA_INIT 149 384# define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150 385# define CMS_F_CMS_SIGNERINFO_SIGN 151 386# define CMS_F_CMS_SIGNERINFO_VERIFY 152 387# define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153 388# define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154 389# define CMS_F_CMS_SIGN_RECEIPT 163 390# define CMS_F_CMS_STREAM 155 391# define CMS_F_CMS_UNCOMPRESS 156 392# define CMS_F_CMS_VERIFY 157 393 394/* Reason codes. */ 395# define CMS_R_ADD_SIGNER_ERROR 99 396# define CMS_R_CERTIFICATE_ALREADY_PRESENT 175 397# define CMS_R_CERTIFICATE_HAS_NO_KEYID 160 398# define CMS_R_CERTIFICATE_VERIFY_ERROR 100 399# define CMS_R_CIPHER_INITIALISATION_ERROR 101 400# define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102 401# define CMS_R_CMS_DATAFINAL_ERROR 103 402# define CMS_R_CMS_LIB 104 403# define CMS_R_CONTENTIDENTIFIER_MISMATCH 170 404# define CMS_R_CONTENT_NOT_FOUND 105 405# define CMS_R_CONTENT_TYPE_MISMATCH 171 406# define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106 407# define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107 408# define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108 409# define CMS_R_CONTENT_VERIFY_ERROR 109 410# define CMS_R_CTRL_ERROR 110 411# define CMS_R_CTRL_FAILURE 111 412# define CMS_R_DECRYPT_ERROR 112 413# define CMS_R_DIGEST_ERROR 161 414# define CMS_R_ERROR_GETTING_PUBLIC_KEY 113 415# define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114 416# define CMS_R_ERROR_SETTING_KEY 115 417# define CMS_R_ERROR_SETTING_RECIPIENTINFO 116 418# define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117 419# define CMS_R_INVALID_KEY_LENGTH 118 420# define CMS_R_MD_BIO_INIT_ERROR 119 421# define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120 422# define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121 423# define CMS_R_MSGSIGDIGEST_ERROR 172 424# define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162 425# define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163 426# define CMS_R_NEED_ONE_SIGNER 164 427# define CMS_R_NOT_A_SIGNED_RECEIPT 165 428# define CMS_R_NOT_ENCRYPTED_DATA 122 429# define CMS_R_NOT_KEK 123 430# define CMS_R_NOT_KEY_TRANSPORT 124 431# define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125 432# define CMS_R_NO_CIPHER 126 433# define CMS_R_NO_CONTENT 127 434# define CMS_R_NO_CONTENT_TYPE 173 435# define CMS_R_NO_DEFAULT_DIGEST 128 436# define CMS_R_NO_DIGEST_SET 129 437# define CMS_R_NO_KEY 130 438# define CMS_R_NO_KEY_OR_CERT 174 439# define CMS_R_NO_MATCHING_DIGEST 131 440# define CMS_R_NO_MATCHING_RECIPIENT 132 441# define CMS_R_NO_MATCHING_SIGNATURE 166 442# define CMS_R_NO_MSGSIGDIGEST 167 443# define CMS_R_NO_PRIVATE_KEY 133 444# define CMS_R_NO_PUBLIC_KEY 134 445# define CMS_R_NO_RECEIPT_REQUEST 168 446# define CMS_R_NO_SIGNERS 135 447# define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136 448# define CMS_R_RECEIPT_DECODE_ERROR 169 449# define CMS_R_RECIPIENT_ERROR 137 450# define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138 451# define CMS_R_SIGNFINAL_ERROR 139 452# define CMS_R_SMIME_TEXT_ERROR 140 453# define CMS_R_STORE_INIT_ERROR 141 454# define CMS_R_TYPE_NOT_COMPRESSED_DATA 142 455# define CMS_R_TYPE_NOT_DATA 143 456# define CMS_R_TYPE_NOT_DIGESTED_DATA 144 457# define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145 458# define CMS_R_TYPE_NOT_ENVELOPED_DATA 146 459# define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147 460# define CMS_R_UNKNOWN_CIPHER 148 461# define CMS_R_UNKNOWN_DIGEST_ALGORIHM 149 462# define CMS_R_UNKNOWN_ID 150 463# define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151 464# define CMS_R_UNSUPPORTED_CONTENT_TYPE 152 465# define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153 466# define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154 467# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE 155 468# define CMS_R_UNSUPPORTED_TYPE 156 469# define CMS_R_UNWRAP_ERROR 157 470# define CMS_R_VERIFICATION_FAILURE 158 471# define CMS_R_WRAP_ERROR 159 472 473#ifdef __cplusplus 474} 475#endif 476#endif 477