Home | History | Annotate | Line # | Download | only in openssl
      1  1.1  christos /*
      2  1.1  christos  * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved.
      3  1.1  christos  *
      4  1.1  christos  * Licensed under the OpenSSL license (the "License").  You may not use
      5  1.1  christos  * this file except in compliance with the License.  You can obtain a copy
      6  1.1  christos  * in the file LICENSE in the source distribution or at
      7  1.1  christos  * https://www.openssl.org/source/license.html
      8  1.1  christos  */
      9  1.1  christos 
     10  1.1  christos #ifndef HEADER_CMS_H
     11  1.1  christos # define HEADER_CMS_H
     12  1.1  christos 
     13  1.1  christos # include <openssl/opensslconf.h>
     14  1.1  christos 
     15  1.1  christos # ifndef OPENSSL_NO_CMS
     16  1.1  christos # include <openssl/x509.h>
     17  1.1  christos # include <openssl/x509v3.h>
     18  1.1  christos # include <openssl/cmserr.h>
     19  1.1  christos # ifdef __cplusplus
     20  1.1  christos extern "C" {
     21  1.1  christos # endif
     22  1.1  christos 
     23  1.1  christos typedef struct CMS_ContentInfo_st CMS_ContentInfo;
     24  1.1  christos typedef struct CMS_SignerInfo_st CMS_SignerInfo;
     25  1.1  christos typedef struct CMS_CertificateChoices CMS_CertificateChoices;
     26  1.1  christos typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
     27  1.1  christos typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
     28  1.1  christos typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
     29  1.1  christos typedef struct CMS_Receipt_st CMS_Receipt;
     30  1.1  christos typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
     31  1.1  christos typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
     32  1.1  christos 
     33  1.1  christos DEFINE_STACK_OF(CMS_SignerInfo)
     34  1.1  christos DEFINE_STACK_OF(CMS_RecipientEncryptedKey)
     35  1.1  christos DEFINE_STACK_OF(CMS_RecipientInfo)
     36  1.1  christos DEFINE_STACK_OF(CMS_RevocationInfoChoice)
     37  1.1  christos DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
     38  1.1  christos DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
     39  1.1  christos DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
     40  1.1  christos 
     41  1.1  christos # define CMS_SIGNERINFO_ISSUER_SERIAL    0
     42  1.1  christos # define CMS_SIGNERINFO_KEYIDENTIFIER    1
     43  1.1  christos 
     44  1.1  christos # define CMS_RECIPINFO_NONE              -1
     45  1.1  christos # define CMS_RECIPINFO_TRANS             0
     46  1.1  christos # define CMS_RECIPINFO_AGREE             1
     47  1.1  christos # define CMS_RECIPINFO_KEK               2
     48  1.1  christos # define CMS_RECIPINFO_PASS              3
     49  1.1  christos # define CMS_RECIPINFO_OTHER             4
     50  1.1  christos 
     51  1.1  christos /* S/MIME related flags */
     52  1.1  christos 
     53  1.1  christos # define CMS_TEXT                        0x1
     54  1.1  christos # define CMS_NOCERTS                     0x2
     55  1.1  christos # define CMS_NO_CONTENT_VERIFY           0x4
     56  1.1  christos # define CMS_NO_ATTR_VERIFY              0x8
     57  1.1  christos # define CMS_NOSIGS                      \
     58  1.1  christos                         (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
     59  1.1  christos # define CMS_NOINTERN                    0x10
     60  1.1  christos # define CMS_NO_SIGNER_CERT_VERIFY       0x20
     61  1.1  christos # define CMS_NOVERIFY                    0x20
     62  1.1  christos # define CMS_DETACHED                    0x40
     63  1.1  christos # define CMS_BINARY                      0x80
     64  1.1  christos # define CMS_NOATTR                      0x100
     65  1.1  christos # define CMS_NOSMIMECAP                  0x200
     66  1.1  christos # define CMS_NOOLDMIMETYPE               0x400
     67  1.1  christos # define CMS_CRLFEOL                     0x800
     68  1.1  christos # define CMS_STREAM                      0x1000
     69  1.1  christos # define CMS_NOCRL                       0x2000
     70  1.1  christos # define CMS_PARTIAL                     0x4000
     71  1.1  christos # define CMS_REUSE_DIGEST                0x8000
     72  1.1  christos # define CMS_USE_KEYID                   0x10000
     73  1.1  christos # define CMS_DEBUG_DECRYPT               0x20000
     74  1.1  christos # define CMS_KEY_PARAM                   0x40000
     75  1.1  christos # define CMS_ASCIICRLF                   0x80000
     76  1.1  christos 
     77  1.1  christos const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
     78  1.1  christos 
     79  1.1  christos BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
     80  1.1  christos int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
     81  1.1  christos 
     82  1.1  christos ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
     83  1.1  christos int CMS_is_detached(CMS_ContentInfo *cms);
     84  1.1  christos int CMS_set_detached(CMS_ContentInfo *cms, int detached);
     85  1.1  christos 
     86  1.1  christos # ifdef HEADER_PEM_H
     87  1.1  christos DECLARE_PEM_rw_const(CMS, CMS_ContentInfo)
     88  1.1  christos # endif
     89  1.1  christos int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
     90  1.1  christos CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
     91  1.1  christos int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
     92  1.1  christos 
     93  1.1  christos BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
     94  1.1  christos int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
     95  1.1  christos int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
     96  1.1  christos                              int flags);
     97  1.1  christos CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
     98  1.1  christos int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
     99  1.1  christos 
    100  1.1  christos int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
    101  1.1  christos               unsigned int flags);
    102  1.1  christos 
    103  1.1  christos CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
    104  1.1  christos                           STACK_OF(X509) *certs, BIO *data,
    105  1.1  christos                           unsigned int flags);
    106  1.1  christos 
    107  1.1  christos CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
    108  1.1  christos                                   X509 *signcert, EVP_PKEY *pkey,
    109  1.1  christos                                   STACK_OF(X509) *certs, unsigned int flags);
    110  1.1  christos 
    111  1.1  christos int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
    112  1.1  christos CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
    113  1.1  christos 
    114  1.1  christos int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
    115  1.1  christos                       unsigned int flags);
    116  1.1  christos CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
    117  1.1  christos                                    unsigned int flags);
    118  1.1  christos 
    119  1.1  christos int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
    120  1.1  christos                               const unsigned char *key, size_t keylen,
    121  1.1  christos                               BIO *dcont, BIO *out, unsigned int flags);
    122  1.1  christos 
    123  1.1  christos CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
    124  1.1  christos                                            const unsigned char *key,
    125  1.1  christos                                            size_t keylen, unsigned int flags);
    126  1.1  christos 
    127  1.1  christos int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
    128  1.1  christos                                const unsigned char *key, size_t keylen);
    129  1.1  christos 
    130  1.1  christos int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
    131  1.1  christos                X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
    132  1.1  christos 
    133  1.1  christos int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
    134  1.1  christos                        STACK_OF(X509) *certs,
    135  1.1  christos                        X509_STORE *store, unsigned int flags);
    136  1.1  christos 
    137  1.1  christos STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
    138  1.1  christos 
    139  1.1  christos CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
    140  1.1  christos                              const EVP_CIPHER *cipher, unsigned int flags);
    141  1.1  christos 
    142  1.1  christos int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
    143  1.1  christos                 BIO *dcont, BIO *out, unsigned int flags);
    144  1.1  christos 
    145  1.1  christos int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
    146  1.1  christos int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
    147  1.1  christos                          unsigned char *key, size_t keylen,
    148  1.1  christos                          const unsigned char *id, size_t idlen);
    149  1.1  christos int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
    150  1.1  christos                               unsigned char *pass, ossl_ssize_t passlen);
    151  1.1  christos 
    152  1.1  christos STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
    153  1.1  christos int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
    154  1.1  christos EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
    155  1.1  christos CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
    156  1.1  christos CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
    157  1.1  christos                                            X509 *recip, unsigned int flags);
    158  1.1  christos int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
    159  1.1  christos int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
    160  1.1  christos int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
    161  1.1  christos                                      EVP_PKEY **pk, X509 **recip,
    162  1.1  christos                                      X509_ALGOR **palg);
    163  1.1  christos int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
    164  1.1  christos                                           ASN1_OCTET_STRING **keyid,
    165  1.1  christos                                           X509_NAME **issuer,
    166  1.1  christos                                           ASN1_INTEGER **sno);
    167  1.1  christos 
    168  1.1  christos CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
    169  1.1  christos                                           unsigned char *key, size_t keylen,
    170  1.1  christos                                           unsigned char *id, size_t idlen,
    171  1.1  christos                                           ASN1_GENERALIZEDTIME *date,
    172  1.1  christos                                           ASN1_OBJECT *otherTypeId,
    173  1.1  christos                                           ASN1_TYPE *otherType);
    174  1.1  christos 
    175  1.1  christos int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
    176  1.1  christos                                     X509_ALGOR **palg,
    177  1.1  christos                                     ASN1_OCTET_STRING **pid,
    178  1.1  christos                                     ASN1_GENERALIZEDTIME **pdate,
    179  1.1  christos                                     ASN1_OBJECT **potherid,
    180  1.1  christos                                     ASN1_TYPE **pothertype);
    181  1.1  christos 
    182  1.1  christos int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
    183  1.1  christos                                unsigned char *key, size_t keylen);
    184  1.1  christos 
    185  1.1  christos int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
    186  1.1  christos                                    const unsigned char *id, size_t idlen);
    187  1.1  christos 
    188  1.1  christos int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
    189  1.1  christos                                     unsigned char *pass,
    190  1.1  christos                                     ossl_ssize_t passlen);
    191  1.1  christos 
    192  1.1  christos CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
    193  1.1  christos                                                int iter, int wrap_nid,
    194  1.1  christos                                                int pbe_nid,
    195  1.1  christos                                                unsigned char *pass,
    196  1.1  christos                                                ossl_ssize_t passlen,
    197  1.1  christos                                                const EVP_CIPHER *kekciph);
    198  1.1  christos 
    199  1.1  christos int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
    200  1.1  christos int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
    201  1.1  christos 
    202  1.1  christos int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
    203  1.1  christos                    unsigned int flags);
    204  1.1  christos CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
    205  1.1  christos 
    206  1.1  christos int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
    207  1.1  christos const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
    208  1.1  christos 
    209  1.1  christos CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
    210  1.1  christos int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
    211  1.1  christos int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
    212  1.1  christos STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
    213  1.1  christos 
    214  1.1  christos CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
    215  1.1  christos int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
    216  1.1  christos int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
    217  1.1  christos STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
    218  1.1  christos 
    219  1.1  christos int CMS_SignedData_init(CMS_ContentInfo *cms);
    220  1.1  christos CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
    221  1.1  christos                                 X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
    222  1.1  christos                                 unsigned int flags);
    223  1.1  christos EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
    224  1.1  christos EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
    225  1.1  christos STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
    226  1.1  christos 
    227  1.1  christos void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
    228  1.1  christos int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
    229  1.1  christos                                   ASN1_OCTET_STRING **keyid,
    230  1.1  christos                                   X509_NAME **issuer, ASN1_INTEGER **sno);
    231  1.1  christos int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
    232  1.1  christos int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
    233  1.1  christos                            unsigned int flags);
    234  1.1  christos void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
    235  1.1  christos                               X509 **signer, X509_ALGOR **pdig,
    236  1.1  christos                               X509_ALGOR **psig);
    237  1.1  christos ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
    238  1.1  christos int CMS_SignerInfo_sign(CMS_SignerInfo *si);
    239  1.1  christos int CMS_SignerInfo_verify(CMS_SignerInfo *si);
    240  1.1  christos int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
    241  1.1  christos 
    242  1.1  christos int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
    243  1.1  christos int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
    244  1.1  christos                             int algnid, int keysize);
    245  1.1  christos int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
    246  1.1  christos 
    247  1.1  christos int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
    248  1.1  christos int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
    249  1.1  christos                                int lastpos);
    250  1.1  christos int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
    251  1.1  christos                                int lastpos);
    252  1.1  christos X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
    253  1.1  christos X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
    254  1.1  christos int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
    255  1.1  christos int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
    256  1.1  christos                                 const ASN1_OBJECT *obj, int type,
    257  1.1  christos                                 const void *bytes, int len);
    258  1.1  christos int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
    259  1.1  christos                                 int nid, int type,
    260  1.1  christos                                 const void *bytes, int len);
    261  1.1  christos int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
    262  1.1  christos                                 const char *attrname, int type,
    263  1.1  christos                                 const void *bytes, int len);
    264  1.1  christos void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid,
    265  1.1  christos                                   int lastpos, int type);
    266  1.1  christos 
    267  1.1  christos int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
    268  1.1  christos int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
    269  1.1  christos                                  int lastpos);
    270  1.1  christos int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
    271  1.1  christos                                  const ASN1_OBJECT *obj, int lastpos);
    272  1.1  christos X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
    273  1.1  christos X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
    274  1.1  christos int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
    275  1.1  christos int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
    276  1.1  christos                                   const ASN1_OBJECT *obj, int type,
    277  1.1  christos                                   const void *bytes, int len);
    278  1.1  christos int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
    279  1.1  christos                                   int nid, int type,
    280  1.1  christos                                   const void *bytes, int len);
    281  1.1  christos int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
    282  1.1  christos                                   const char *attrname, int type,
    283  1.1  christos                                   const void *bytes, int len);
    284  1.1  christos void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
    285  1.1  christos                                     int lastpos, int type);
    286  1.1  christos 
    287  1.1  christos int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
    288  1.1  christos CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
    289  1.1  christos                                                int allorfirst,
    290  1.1  christos                                                STACK_OF(GENERAL_NAMES)
    291  1.1  christos                                                *receiptList, STACK_OF(GENERAL_NAMES)
    292  1.1  christos                                                *receiptsTo);
    293  1.1  christos int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
    294  1.1  christos void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
    295  1.1  christos                                     ASN1_STRING **pcid,
    296  1.1  christos                                     int *pallorfirst,
    297  1.1  christos                                     STACK_OF(GENERAL_NAMES) **plist,
    298  1.1  christos                                     STACK_OF(GENERAL_NAMES) **prto);
    299  1.1  christos int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
    300  1.1  christos                                     X509_ALGOR **palg,
    301  1.1  christos                                     ASN1_OCTET_STRING **pukm);
    302  1.1  christos STACK_OF(CMS_RecipientEncryptedKey)
    303  1.1  christos *CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
    304  1.1  christos 
    305  1.1  christos int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
    306  1.1  christos                                         X509_ALGOR **pubalg,
    307  1.1  christos                                         ASN1_BIT_STRING **pubkey,
    308  1.1  christos                                         ASN1_OCTET_STRING **keyid,
    309  1.1  christos                                         X509_NAME **issuer,
    310  1.1  christos                                         ASN1_INTEGER **sno);
    311  1.1  christos 
    312  1.1  christos int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
    313  1.1  christos 
    314  1.1  christos int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
    315  1.1  christos                                       ASN1_OCTET_STRING **keyid,
    316  1.1  christos                                       ASN1_GENERALIZEDTIME **tm,
    317  1.1  christos                                       CMS_OtherKeyAttribute **other,
    318  1.1  christos                                       X509_NAME **issuer, ASN1_INTEGER **sno);
    319  1.1  christos int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
    320  1.1  christos                                        X509 *cert);
    321  1.1  christos int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
    322  1.1  christos EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
    323  1.1  christos int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
    324  1.1  christos                                    CMS_RecipientInfo *ri,
    325  1.1  christos                                    CMS_RecipientEncryptedKey *rek);
    326  1.1  christos 
    327  1.1  christos int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
    328  1.1  christos                           ASN1_OCTET_STRING *ukm, int keylen);
    329  1.1  christos 
    330  1.1  christos /* Backward compatibility for spelling errors. */
    331  1.1  christos # define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
    332  1.1  christos # define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
    333  1.1  christos     CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
    334  1.1  christos 
    335  1.1  christos #  ifdef  __cplusplus
    336  1.1  christos }
    337  1.1  christos #  endif
    338  1.1  christos # endif
    339  1.1  christos #endif
    340