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