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