annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/openssl/cms.h @ 69:33d812a61356

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