LTKCPP-- LLRP Toolkit C Plus Plus Library
cms.h
00001 /* crypto/cms/cms.h */
00002 /*
00003  * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
00004  * project.
00005  */
00006 /* ====================================================================
00007  * Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  *
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  *
00016  * 2. Redistributions in binary form must reproduce the above copyright
00017  *    notice, this list of conditions and the following disclaimer in
00018  *    the documentation and/or other materials provided with the
00019  *    distribution.
00020  *
00021  * 3. All advertising materials mentioning features or use of this
00022  *    software must display the following acknowledgment:
00023  *    "This product includes software developed by the OpenSSL Project
00024  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
00025  *
00026  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
00027  *    endorse or promote products derived from this software without
00028  *    prior written permission. For written permission, please contact
00029  *    licensing@OpenSSL.org.
00030  *
00031  * 5. Products derived from this software may not be called "OpenSSL"
00032  *    nor may "OpenSSL" appear in their names without prior written
00033  *    permission of the OpenSSL Project.
00034  *
00035  * 6. Redistributions of any form whatsoever must retain the following
00036  *    acknowledgment:
00037  *    "This product includes software developed by the OpenSSL Project
00038  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
00039  *
00040  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
00041  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00042  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00043  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
00044  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00045  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00046  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00047  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00048  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00049  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00050  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00051  * OF THE POSSIBILITY OF SUCH DAMAGE.
00052  * ====================================================================
00053  */
00054 
00055 #ifndef HEADER_CMS_H
00056 # define HEADER_CMS_H
00057 
00058 # include <openssl/x509.h>
00059 
00060 # ifdef OPENSSL_NO_CMS
00061 #  error CMS is disabled.
00062 # endif
00063 
00064 #ifdef __cplusplus
00065 extern "C" {
00066 #endif
00067 
00068 typedef struct CMS_ContentInfo_st CMS_ContentInfo;
00069 typedef struct CMS_SignerInfo_st CMS_SignerInfo;
00070 typedef struct CMS_CertificateChoices CMS_CertificateChoices;
00071 typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
00072 typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
00073 typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
00074 typedef struct CMS_Receipt_st CMS_Receipt;
00075 typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
00076 typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
00077 
00078 DECLARE_STACK_OF(CMS_SignerInfo)
00079 DECLARE_STACK_OF(GENERAL_NAMES)
00080 DECLARE_STACK_OF(CMS_RecipientEncryptedKey)
00081 DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
00082 DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
00083 DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
00084 
00085 # define CMS_SIGNERINFO_ISSUER_SERIAL    0
00086 # define CMS_SIGNERINFO_KEYIDENTIFIER    1
00087 
00088 # define CMS_RECIPINFO_NONE              -1
00089 # define CMS_RECIPINFO_TRANS             0
00090 # define CMS_RECIPINFO_AGREE             1
00091 # define CMS_RECIPINFO_KEK               2
00092 # define CMS_RECIPINFO_PASS              3
00093 # define CMS_RECIPINFO_OTHER             4
00094 
00095 /* S/MIME related flags */
00096 
00097 # define CMS_TEXT                        0x1
00098 # define CMS_NOCERTS                     0x2
00099 # define CMS_NO_CONTENT_VERIFY           0x4
00100 # define CMS_NO_ATTR_VERIFY              0x8
00101 # define CMS_NOSIGS                      \
00102                         (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
00103 # define CMS_NOINTERN                    0x10
00104 # define CMS_NO_SIGNER_CERT_VERIFY       0x20
00105 # define CMS_NOVERIFY                    0x20
00106 # define CMS_DETACHED                    0x40
00107 # define CMS_BINARY                      0x80
00108 # define CMS_NOATTR                      0x100
00109 # define CMS_NOSMIMECAP                  0x200
00110 # define CMS_NOOLDMIMETYPE               0x400
00111 # define CMS_CRLFEOL                     0x800
00112 # define CMS_STREAM                      0x1000
00113 # define CMS_NOCRL                       0x2000
00114 # define CMS_PARTIAL                     0x4000
00115 # define CMS_REUSE_DIGEST                0x8000
00116 # define CMS_USE_KEYID                   0x10000
00117 # define CMS_DEBUG_DECRYPT               0x20000
00118 # define CMS_KEY_PARAM                   0x40000
00119 
00120 const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms);
00121 
00122 BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
00123 int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
00124 
00125 ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
00126 int CMS_is_detached(CMS_ContentInfo *cms);
00127 int CMS_set_detached(CMS_ContentInfo *cms, int detached);
00128 
00129 # ifdef HEADER_PEM_H
00130 DECLARE_PEM_rw_const(CMS, CMS_ContentInfo)
00131 # endif
00132 int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
00133 CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
00134 int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
00135 
00136 BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
00137 int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
00138 int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
00139                              int flags);
00140 CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
00141 int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
00142 
00143 int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
00144               unsigned int flags);
00145 
00146 CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
00147                           STACK_OF(X509) *certs, BIO *data,
00148                           unsigned int flags);
00149 
00150 CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
00151                                   X509 *signcert, EVP_PKEY *pkey,
00152                                   STACK_OF(X509) *certs, unsigned int flags);
00153 
00154 int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
00155 CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
00156 
00157 int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
00158                       unsigned int flags);
00159 CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
00160                                    unsigned int flags);
00161 
00162 int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
00163                               const unsigned char *key, size_t keylen,
00164                               BIO *dcont, BIO *out, unsigned int flags);
00165 
00166 CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
00167                                            const unsigned char *key,
00168                                            size_t keylen, unsigned int flags);
00169 
00170 int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
00171                                const unsigned char *key, size_t keylen);
00172 
00173 int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
00174                X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
00175 
00176 int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
00177                        STACK_OF(X509) *certs,
00178                        X509_STORE *store, unsigned int flags);
00179 
00180 STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
00181 
00182 CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
00183                              const EVP_CIPHER *cipher, unsigned int flags);
00184 
00185 int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
00186                 BIO *dcont, BIO *out, unsigned int flags);
00187 
00188 int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
00189 int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
00190                          unsigned char *key, size_t keylen,
00191                          unsigned char *id, size_t idlen);
00192 int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
00193                               unsigned char *pass, ossl_ssize_t passlen);
00194 
00195 STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
00196 int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
00197 EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
00198 CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
00199 CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
00200                                            X509 *recip, unsigned int flags);
00201 int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
00202 int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
00203 int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
00204                                      EVP_PKEY **pk, X509 **recip,
00205                                      X509_ALGOR **palg);
00206 int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
00207                                           ASN1_OCTET_STRING **keyid,
00208                                           X509_NAME **issuer,
00209                                           ASN1_INTEGER **sno);
00210 
00211 CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
00212                                           unsigned char *key, size_t keylen,
00213                                           unsigned char *id, size_t idlen,
00214                                           ASN1_GENERALIZEDTIME *date,
00215                                           ASN1_OBJECT *otherTypeId,
00216                                           ASN1_TYPE *otherType);
00217 
00218 int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
00219                                     X509_ALGOR **palg,
00220                                     ASN1_OCTET_STRING **pid,
00221                                     ASN1_GENERALIZEDTIME **pdate,
00222                                     ASN1_OBJECT **potherid,
00223                                     ASN1_TYPE **pothertype);
00224 
00225 int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
00226                                unsigned char *key, size_t keylen);
00227 
00228 int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
00229                                    const unsigned char *id, size_t idlen);
00230 
00231 int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
00232                                     unsigned char *pass,
00233                                     ossl_ssize_t passlen);
00234 
00235 CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
00236                                                int iter, int wrap_nid,
00237                                                int pbe_nid,
00238                                                unsigned char *pass,
00239                                                ossl_ssize_t passlen,
00240                                                const EVP_CIPHER *kekciph);
00241 
00242 int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
00243 int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
00244 
00245 int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
00246                    unsigned int flags);
00247 CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
00248 
00249 int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
00250 const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
00251 
00252 CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
00253 int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
00254 int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
00255 STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
00256 
00257 CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
00258 int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
00259 int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
00260 STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
00261 
00262 int CMS_SignedData_init(CMS_ContentInfo *cms);
00263 CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
00264                                 X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
00265                                 unsigned int flags);
00266 EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
00267 EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
00268 STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
00269 
00270 void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
00271 int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
00272                                   ASN1_OCTET_STRING **keyid,
00273                                   X509_NAME **issuer, ASN1_INTEGER **sno);
00274 int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
00275 int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
00276                            unsigned int flags);
00277 void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
00278                               X509 **signer, X509_ALGOR **pdig,
00279                               X509_ALGOR **psig);
00280 ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
00281 int CMS_SignerInfo_sign(CMS_SignerInfo *si);
00282 int CMS_SignerInfo_verify(CMS_SignerInfo *si);
00283 int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
00284 
00285 int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
00286 int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
00287                             int algnid, int keysize);
00288 int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
00289 
00290 int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
00291 int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
00292                                int lastpos);
00293 int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,
00294                                int lastpos);
00295 X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
00296 X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
00297 int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
00298 int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
00299                                 const ASN1_OBJECT *obj, int type,
00300                                 const void *bytes, int len);
00301 int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
00302                                 int nid, int type,
00303                                 const void *bytes, int len);
00304 int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
00305                                 const char *attrname, int type,
00306                                 const void *bytes, int len);
00307 void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
00308                                   int lastpos, int type);
00309 
00310 int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
00311 int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
00312                                  int lastpos);
00313 int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,
00314                                  int lastpos);
00315 X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
00316 X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
00317 int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
00318 int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
00319                                   const ASN1_OBJECT *obj, int type,
00320                                   const void *bytes, int len);
00321 int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
00322                                   int nid, int type,
00323                                   const void *bytes, int len);
00324 int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
00325                                   const char *attrname, int type,
00326                                   const void *bytes, int len);
00327 void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
00328                                     int lastpos, int type);
00329 
00330 # ifdef HEADER_X509V3_H
00331 
00332 int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
00333 CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
00334                                                int allorfirst,
00335                                                STACK_OF(GENERAL_NAMES)
00336                                                *receiptList, STACK_OF(GENERAL_NAMES)
00337                                                *receiptsTo);
00338 int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
00339 void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
00340                                     ASN1_STRING **pcid,
00341                                     int *pallorfirst,
00342                                     STACK_OF(GENERAL_NAMES) **plist,
00343                                     STACK_OF(GENERAL_NAMES) **prto);
00344 # endif
00345 int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
00346                                     X509_ALGOR **palg,
00347                                     ASN1_OCTET_STRING **pukm);
00348 STACK_OF(CMS_RecipientEncryptedKey)
00349 *CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
00350 
00351 int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
00352                                         X509_ALGOR **pubalg,
00353                                         ASN1_BIT_STRING **pubkey,
00354                                         ASN1_OCTET_STRING **keyid,
00355                                         X509_NAME **issuer,
00356                                         ASN1_INTEGER **sno);
00357 
00358 int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
00359 
00360 int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
00361                                       ASN1_OCTET_STRING **keyid,
00362                                       ASN1_GENERALIZEDTIME **tm,
00363                                       CMS_OtherKeyAttribute **other,
00364                                       X509_NAME **issuer, ASN1_INTEGER **sno);
00365 int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
00366                                        X509 *cert);
00367 int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
00368 EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
00369 int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
00370                                    CMS_RecipientInfo *ri,
00371                                    CMS_RecipientEncryptedKey *rek);
00372 
00373 int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
00374                           ASN1_OCTET_STRING *ukm, int keylen);
00375 
00376 /* BEGIN ERROR CODES */
00377 /*
00378  * The following lines are auto generated by the script mkerr.pl. Any changes
00379  * made after this point may be overwritten when the script is next run.
00380  */
00381 void ERR_load_CMS_strings(void);
00382 
00383 /* Error codes for the CMS functions. */
00384 
00385 /* Function codes. */
00386 # define CMS_F_CHECK_CONTENT                              99
00387 # define CMS_F_CMS_ADD0_CERT                              164
00388 # define CMS_F_CMS_ADD0_RECIPIENT_KEY                     100
00389 # define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD                165
00390 # define CMS_F_CMS_ADD1_RECEIPTREQUEST                    158
00391 # define CMS_F_CMS_ADD1_RECIPIENT_CERT                    101
00392 # define CMS_F_CMS_ADD1_SIGNER                            102
00393 # define CMS_F_CMS_ADD1_SIGNINGTIME                       103
00394 # define CMS_F_CMS_COMPRESS                               104
00395 # define CMS_F_CMS_COMPRESSEDDATA_CREATE                  105
00396 # define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO                106
00397 # define CMS_F_CMS_COPY_CONTENT                           107
00398 # define CMS_F_CMS_COPY_MESSAGEDIGEST                     108
00399 # define CMS_F_CMS_DATA                                   109
00400 # define CMS_F_CMS_DATAFINAL                              110
00401 # define CMS_F_CMS_DATAINIT                               111
00402 # define CMS_F_CMS_DECRYPT                                112
00403 # define CMS_F_CMS_DECRYPT_SET1_KEY                       113
00404 # define CMS_F_CMS_DECRYPT_SET1_PASSWORD                  166
00405 # define CMS_F_CMS_DECRYPT_SET1_PKEY                      114
00406 # define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX               115
00407 # define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO               116
00408 # define CMS_F_CMS_DIGESTEDDATA_DO_FINAL                  117
00409 # define CMS_F_CMS_DIGEST_VERIFY                          118
00410 # define CMS_F_CMS_ENCODE_RECEIPT                         161
00411 # define CMS_F_CMS_ENCRYPT                                119
00412 # define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO              120
00413 # define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT                  121
00414 # define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT                  122
00415 # define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY                 123
00416 # define CMS_F_CMS_ENVELOPEDDATA_CREATE                   124
00417 # define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO                 125
00418 # define CMS_F_CMS_ENVELOPED_DATA_INIT                    126
00419 # define CMS_F_CMS_ENV_ASN1_CTRL                          171
00420 # define CMS_F_CMS_FINAL                                  127
00421 # define CMS_F_CMS_GET0_CERTIFICATE_CHOICES               128
00422 # define CMS_F_CMS_GET0_CONTENT                           129
00423 # define CMS_F_CMS_GET0_ECONTENT_TYPE                     130
00424 # define CMS_F_CMS_GET0_ENVELOPED                         131
00425 # define CMS_F_CMS_GET0_REVOCATION_CHOICES                132
00426 # define CMS_F_CMS_GET0_SIGNED                            133
00427 # define CMS_F_CMS_MSGSIGDIGEST_ADD1                      162
00428 # define CMS_F_CMS_RECEIPTREQUEST_CREATE0                 159
00429 # define CMS_F_CMS_RECEIPT_VERIFY                         160
00430 # define CMS_F_CMS_RECIPIENTINFO_DECRYPT                  134
00431 # define CMS_F_CMS_RECIPIENTINFO_ENCRYPT                  169
00432 # define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT             178
00433 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG            175
00434 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID        173
00435 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS           172
00436 # define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP         174
00437 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT            135
00438 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT            136
00439 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID            137
00440 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP             138
00441 # define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP            139
00442 # define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT             140
00443 # define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT             141
00444 # define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS           142
00445 # define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID      143
00446 # define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT               167
00447 # define CMS_F_CMS_RECIPIENTINFO_SET0_KEY                 144
00448 # define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD            168
00449 # define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY                145
00450 # define CMS_F_CMS_SD_ASN1_CTRL                           170
00451 # define CMS_F_CMS_SET1_IAS                               176
00452 # define CMS_F_CMS_SET1_KEYID                             177
00453 # define CMS_F_CMS_SET1_SIGNERIDENTIFIER                  146
00454 # define CMS_F_CMS_SET_DETACHED                           147
00455 # define CMS_F_CMS_SIGN                                   148
00456 # define CMS_F_CMS_SIGNED_DATA_INIT                       149
00457 # define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN                150
00458 # define CMS_F_CMS_SIGNERINFO_SIGN                        151
00459 # define CMS_F_CMS_SIGNERINFO_VERIFY                      152
00460 # define CMS_F_CMS_SIGNERINFO_VERIFY_CERT                 153
00461 # define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT              154
00462 # define CMS_F_CMS_SIGN_RECEIPT                           163
00463 # define CMS_F_CMS_STREAM                                 155
00464 # define CMS_F_CMS_UNCOMPRESS                             156
00465 # define CMS_F_CMS_VERIFY                                 157
00466 
00467 /* Reason codes. */
00468 # define CMS_R_ADD_SIGNER_ERROR                           99
00469 # define CMS_R_CERTIFICATE_ALREADY_PRESENT                175
00470 # define CMS_R_CERTIFICATE_HAS_NO_KEYID                   160
00471 # define CMS_R_CERTIFICATE_VERIFY_ERROR                   100
00472 # define CMS_R_CIPHER_INITIALISATION_ERROR                101
00473 # define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR      102
00474 # define CMS_R_CMS_DATAFINAL_ERROR                        103
00475 # define CMS_R_CMS_LIB                                    104
00476 # define CMS_R_CONTENTIDENTIFIER_MISMATCH                 170
00477 # define CMS_R_CONTENT_NOT_FOUND                          105
00478 # define CMS_R_CONTENT_TYPE_MISMATCH                      171
00479 # define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA           106
00480 # define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA            107
00481 # define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA               108
00482 # define CMS_R_CONTENT_VERIFY_ERROR                       109
00483 # define CMS_R_CTRL_ERROR                                 110
00484 # define CMS_R_CTRL_FAILURE                               111
00485 # define CMS_R_DECRYPT_ERROR                              112
00486 # define CMS_R_DIGEST_ERROR                               161
00487 # define CMS_R_ERROR_GETTING_PUBLIC_KEY                   113
00488 # define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE      114
00489 # define CMS_R_ERROR_SETTING_KEY                          115
00490 # define CMS_R_ERROR_SETTING_RECIPIENTINFO                116
00491 # define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH               117
00492 # define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER           176
00493 # define CMS_R_INVALID_KEY_LENGTH                         118
00494 # define CMS_R_MD_BIO_INIT_ERROR                          119
00495 # define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH       120
00496 # define CMS_R_MESSAGEDIGEST_WRONG_LENGTH                 121
00497 # define CMS_R_MSGSIGDIGEST_ERROR                         172
00498 # define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE          162
00499 # define CMS_R_MSGSIGDIGEST_WRONG_LENGTH                  163
00500 # define CMS_R_NEED_ONE_SIGNER                            164
00501 # define CMS_R_NOT_A_SIGNED_RECEIPT                       165
00502 # define CMS_R_NOT_ENCRYPTED_DATA                         122
00503 # define CMS_R_NOT_KEK                                    123
00504 # define CMS_R_NOT_KEY_AGREEMENT                          181
00505 # define CMS_R_NOT_KEY_TRANSPORT                          124
00506 # define CMS_R_NOT_PWRI                                   177
00507 # define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE            125
00508 # define CMS_R_NO_CIPHER                                  126
00509 # define CMS_R_NO_CONTENT                                 127
00510 # define CMS_R_NO_CONTENT_TYPE                            173
00511 # define CMS_R_NO_DEFAULT_DIGEST                          128
00512 # define CMS_R_NO_DIGEST_SET                              129
00513 # define CMS_R_NO_KEY                                     130
00514 # define CMS_R_NO_KEY_OR_CERT                             174
00515 # define CMS_R_NO_MATCHING_DIGEST                         131
00516 # define CMS_R_NO_MATCHING_RECIPIENT                      132
00517 # define CMS_R_NO_MATCHING_SIGNATURE                      166
00518 # define CMS_R_NO_MSGSIGDIGEST                            167
00519 # define CMS_R_NO_PASSWORD                                178
00520 # define CMS_R_NO_PRIVATE_KEY                             133
00521 # define CMS_R_NO_PUBLIC_KEY                              134
00522 # define CMS_R_NO_RECEIPT_REQUEST                         168
00523 # define CMS_R_NO_SIGNERS                                 135
00524 # define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE     136
00525 # define CMS_R_RECEIPT_DECODE_ERROR                       169
00526 # define CMS_R_RECIPIENT_ERROR                            137
00527 # define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND               138
00528 # define CMS_R_SIGNFINAL_ERROR                            139
00529 # define CMS_R_SMIME_TEXT_ERROR                           140
00530 # define CMS_R_STORE_INIT_ERROR                           141
00531 # define CMS_R_TYPE_NOT_COMPRESSED_DATA                   142
00532 # define CMS_R_TYPE_NOT_DATA                              143
00533 # define CMS_R_TYPE_NOT_DIGESTED_DATA                     144
00534 # define CMS_R_TYPE_NOT_ENCRYPTED_DATA                    145
00535 # define CMS_R_TYPE_NOT_ENVELOPED_DATA                    146
00536 # define CMS_R_UNABLE_TO_FINALIZE_CONTEXT                 147
00537 # define CMS_R_UNKNOWN_CIPHER                             148
00538 # define CMS_R_UNKNOWN_DIGEST_ALGORIHM                    149
00539 # define CMS_R_UNKNOWN_ID                                 150
00540 # define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM          151
00541 # define CMS_R_UNSUPPORTED_CONTENT_TYPE                   152
00542 # define CMS_R_UNSUPPORTED_KEK_ALGORITHM                  153
00543 # define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM       179
00544 # define CMS_R_UNSUPPORTED_RECIPIENT_TYPE                 154
00545 # define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE              155
00546 # define CMS_R_UNSUPPORTED_TYPE                           156
00547 # define CMS_R_UNWRAP_ERROR                               157
00548 # define CMS_R_UNWRAP_FAILURE                             180
00549 # define CMS_R_VERIFICATION_FAILURE                       158
00550 # define CMS_R_WRAP_ERROR                                 159
00551 
00552 #ifdef  __cplusplus
00553 }
00554 #endif
00555 #endif