source: EcnlProtoTool/trunk/openssl-1.1.0e/include/openssl/cms.h@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 25.9 KB
Line 
1/*
2 * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#ifndef HEADER_CMS_H
11# define HEADER_CMS_H
12
13# include <openssl/opensslconf.h>
14
15# ifndef OPENSSL_NO_CMS
16# include <openssl/x509.h>
17# include <openssl/x509v3.h>
18# ifdef __cplusplus
19extern "C" {
20# endif
21
22typedef struct CMS_ContentInfo_st CMS_ContentInfo;
23typedef struct CMS_SignerInfo_st CMS_SignerInfo;
24typedef struct CMS_CertificateChoices CMS_CertificateChoices;
25typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
26typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
27typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
28typedef struct CMS_Receipt_st CMS_Receipt;
29typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
30typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
31
32DEFINE_STACK_OF(CMS_SignerInfo)
33DEFINE_STACK_OF(CMS_RecipientEncryptedKey)
34DEFINE_STACK_OF(CMS_RecipientInfo)
35DEFINE_STACK_OF(CMS_RevocationInfoChoice)
36DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
37DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
38DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
39
40# define CMS_SIGNERINFO_ISSUER_SERIAL 0
41# define CMS_SIGNERINFO_KEYIDENTIFIER 1
42
43# define CMS_RECIPINFO_NONE -1
44# define CMS_RECIPINFO_TRANS 0
45# define CMS_RECIPINFO_AGREE 1
46# define CMS_RECIPINFO_KEK 2
47# define CMS_RECIPINFO_PASS 3
48# define CMS_RECIPINFO_OTHER 4
49
50/* S/MIME related flags */
51
52# define CMS_TEXT 0x1
53# define CMS_NOCERTS 0x2
54# define CMS_NO_CONTENT_VERIFY 0x4
55# define CMS_NO_ATTR_VERIFY 0x8
56# define CMS_NOSIGS \
57 (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
58# define CMS_NOINTERN 0x10
59# define CMS_NO_SIGNER_CERT_VERIFY 0x20
60# define CMS_NOVERIFY 0x20
61# define CMS_DETACHED 0x40
62# define CMS_BINARY 0x80
63# define CMS_NOATTR 0x100
64# define CMS_NOSMIMECAP 0x200
65# define CMS_NOOLDMIMETYPE 0x400
66# define CMS_CRLFEOL 0x800
67# define CMS_STREAM 0x1000
68# define CMS_NOCRL 0x2000
69# define CMS_PARTIAL 0x4000
70# define CMS_REUSE_DIGEST 0x8000
71# define CMS_USE_KEYID 0x10000
72# define CMS_DEBUG_DECRYPT 0x20000
73# define CMS_KEY_PARAM 0x40000
74# define CMS_ASCIICRLF 0x80000
75
76const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
77
78BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
79int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
80
81ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
82int CMS_is_detached(CMS_ContentInfo *cms);
83int CMS_set_detached(CMS_ContentInfo *cms, int detached);
84
85# ifdef HEADER_PEM_H
86DECLARE_PEM_rw_const(CMS, CMS_ContentInfo)
87# endif
88int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
89CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
90int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
91
92BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
93int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
94int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
95 int flags);
96CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
97int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
98
99int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
100 unsigned int flags);
101
102CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
103 STACK_OF(X509) *certs, BIO *data,
104 unsigned int flags);
105
106CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
107 X509 *signcert, EVP_PKEY *pkey,
108 STACK_OF(X509) *certs, unsigned int flags);
109
110int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
111CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
112
113int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
114 unsigned int flags);
115CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
116 unsigned int flags);
117
118int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
119 const unsigned char *key, size_t keylen,
120 BIO *dcont, BIO *out, unsigned int flags);
121
122CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
123 const unsigned char *key,
124 size_t keylen, unsigned int flags);
125
126int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
127 const unsigned char *key, size_t keylen);
128
129int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
130 X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
131
132int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
133 STACK_OF(X509) *certs,
134 X509_STORE *store, unsigned int flags);
135
136STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
137
138CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
139 const EVP_CIPHER *cipher, unsigned int flags);
140
141int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
142 BIO *dcont, BIO *out, unsigned int flags);
143
144int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
145int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
146 unsigned char *key, size_t keylen,
147 const unsigned char *id, size_t idlen);
148int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
149 unsigned char *pass, ossl_ssize_t passlen);
150
151STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
152int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
153EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
154CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
155CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
156 X509 *recip, unsigned int flags);
157int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
158int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
159int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
160 EVP_PKEY **pk, X509 **recip,
161 X509_ALGOR **palg);
162int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
163 ASN1_OCTET_STRING **keyid,
164 X509_NAME **issuer,
165 ASN1_INTEGER **sno);
166
167CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
168 unsigned char *key, size_t keylen,
169 unsigned char *id, size_t idlen,
170 ASN1_GENERALIZEDTIME *date,
171 ASN1_OBJECT *otherTypeId,
172 ASN1_TYPE *otherType);
173
174int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
175 X509_ALGOR **palg,
176 ASN1_OCTET_STRING **pid,
177 ASN1_GENERALIZEDTIME **pdate,
178 ASN1_OBJECT **potherid,
179 ASN1_TYPE **pothertype);
180
181int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
182 unsigned char *key, size_t keylen);
183
184int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
185 const unsigned char *id, size_t idlen);
186
187int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
188 unsigned char *pass,
189 ossl_ssize_t passlen);
190
191CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
192 int iter, int wrap_nid,
193 int pbe_nid,
194 unsigned char *pass,
195 ossl_ssize_t passlen,
196 const EVP_CIPHER *kekciph);
197
198int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
199int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
200
201int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
202 unsigned int flags);
203CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
204
205int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
206const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
207
208CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
209int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
210int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
211STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
212
213CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
214int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
215int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
216STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
217
218int CMS_SignedData_init(CMS_ContentInfo *cms);
219CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
220 X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
221 unsigned int flags);
222EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
223EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
224STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
225
226void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
227int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
228 ASN1_OCTET_STRING **keyid,
229 X509_NAME **issuer, ASN1_INTEGER **sno);
230int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
231int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
232 unsigned int flags);
233void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
234 X509 **signer, X509_ALGOR **pdig,
235 X509_ALGOR **psig);
236ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
237int CMS_SignerInfo_sign(CMS_SignerInfo *si);
238int CMS_SignerInfo_verify(CMS_SignerInfo *si);
239int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
240
241int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
242int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
243 int algnid, int keysize);
244int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
245
246int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
247int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
248 int lastpos);
249int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
250 int lastpos);
251X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
252X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
253int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
254int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
255 const ASN1_OBJECT *obj, int type,
256 const void *bytes, int len);
257int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
258 int nid, int type,
259 const void *bytes, int len);
260int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
261 const char *attrname, int type,
262 const void *bytes, int len);
263void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid,
264 int lastpos, int type);
265
266int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
267int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
268 int lastpos);
269int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
270 const ASN1_OBJECT *obj, int lastpos);
271X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
272X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
273int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
274int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
275 const ASN1_OBJECT *obj, int type,
276 const void *bytes, int len);
277int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
278 int nid, int type,
279 const void *bytes, int len);
280int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
281 const char *attrname, int type,
282 const void *bytes, int len);
283void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
284 int lastpos, int type);
285
286# ifdef HEADER_X509V3_H
287
288int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
289CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,
290 int allorfirst,
291 STACK_OF(GENERAL_NAMES)
292 *receiptList, STACK_OF(GENERAL_NAMES)
293 *receiptsTo);
294int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
295void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
296 ASN1_STRING **pcid,
297 int *pallorfirst,
298 STACK_OF(GENERAL_NAMES) **plist,
299 STACK_OF(GENERAL_NAMES) **prto);
300# endif
301int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
302 X509_ALGOR **palg,
303 ASN1_OCTET_STRING **pukm);
304STACK_OF(CMS_RecipientEncryptedKey)
305*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
306
307int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
308 X509_ALGOR **pubalg,
309 ASN1_BIT_STRING **pubkey,
310 ASN1_OCTET_STRING **keyid,
311 X509_NAME **issuer,
312 ASN1_INTEGER **sno);
313
314int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
315
316int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
317 ASN1_OCTET_STRING **keyid,
318 ASN1_GENERALIZEDTIME **tm,
319 CMS_OtherKeyAttribute **other,
320 X509_NAME **issuer, ASN1_INTEGER **sno);
321int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
322 X509 *cert);
323int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
324EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
325int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
326 CMS_RecipientInfo *ri,
327 CMS_RecipientEncryptedKey *rek);
328
329int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
330 ASN1_OCTET_STRING *ukm, int keylen);
331
332/* BEGIN ERROR CODES */
333/*
334 * The following lines are auto generated by the script mkerr.pl. Any changes
335 * made after this point may be overwritten when the script is next run.
336 */
337
338int ERR_load_CMS_strings(void);
339
340/* Error codes for the CMS functions. */
341
342/* Function codes. */
343# define CMS_F_CHECK_CONTENT 99
344# define CMS_F_CMS_ADD0_CERT 164
345# define CMS_F_CMS_ADD0_RECIPIENT_KEY 100
346# define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 165
347# define CMS_F_CMS_ADD1_RECEIPTREQUEST 158
348# define CMS_F_CMS_ADD1_RECIPIENT_CERT 101
349# define CMS_F_CMS_ADD1_SIGNER 102
350# define CMS_F_CMS_ADD1_SIGNINGTIME 103
351# define CMS_F_CMS_COMPRESS 104
352# define CMS_F_CMS_COMPRESSEDDATA_CREATE 105
353# define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 106
354# define CMS_F_CMS_COPY_CONTENT 107
355# define CMS_F_CMS_COPY_MESSAGEDIGEST 108
356# define CMS_F_CMS_DATA 109
357# define CMS_F_CMS_DATAFINAL 110
358# define CMS_F_CMS_DATAINIT 111
359# define CMS_F_CMS_DECRYPT 112
360# define CMS_F_CMS_DECRYPT_SET1_KEY 113
361# define CMS_F_CMS_DECRYPT_SET1_PASSWORD 166
362# define CMS_F_CMS_DECRYPT_SET1_PKEY 114
363# define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 115
364# define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 116
365# define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 117
366# define CMS_F_CMS_DIGEST_VERIFY 118
367# define CMS_F_CMS_ENCODE_RECEIPT 161
368# define CMS_F_CMS_ENCRYPT 119
369# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120
370# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121
371# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122
372# define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 123
373# define CMS_F_CMS_ENVELOPEDDATA_CREATE 124
374# define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 125
375# define CMS_F_CMS_ENVELOPED_DATA_INIT 126
376# define CMS_F_CMS_ENV_ASN1_CTRL 171
377# define CMS_F_CMS_FINAL 127
378# define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 128
379# define CMS_F_CMS_GET0_CONTENT 129
380# define CMS_F_CMS_GET0_ECONTENT_TYPE 130
381# define CMS_F_CMS_GET0_ENVELOPED 131
382# define CMS_F_CMS_GET0_REVOCATION_CHOICES 132
383# define CMS_F_CMS_GET0_SIGNED 133
384# define CMS_F_CMS_MSGSIGDIGEST_ADD1 162
385# define CMS_F_CMS_RECEIPTREQUEST_CREATE0 159
386# define CMS_F_CMS_RECEIPT_VERIFY 160
387# define CMS_F_CMS_RECIPIENTINFO_DECRYPT 134
388# define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 169
389# define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 178
390# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 175
391# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 173
392# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 172
393# define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 174
394# define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 135
395# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 136
396# define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 137
397# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 138
398# define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 139
399# define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 140
400# define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 141
401# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 142
402# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 143
403# define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 167
404# define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 144
405# define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 168
406# define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 145
407# define CMS_F_CMS_SD_ASN1_CTRL 170
408# define CMS_F_CMS_SET1_IAS 176
409# define CMS_F_CMS_SET1_KEYID 177
410# define CMS_F_CMS_SET1_SIGNERIDENTIFIER 146
411# define CMS_F_CMS_SET_DETACHED 147
412# define CMS_F_CMS_SIGN 148
413# define CMS_F_CMS_SIGNED_DATA_INIT 149
414# define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150
415# define CMS_F_CMS_SIGNERINFO_SIGN 151
416# define CMS_F_CMS_SIGNERINFO_VERIFY 152
417# define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153
418# define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154
419# define CMS_F_CMS_SIGN_RECEIPT 163
420# define CMS_F_CMS_STREAM 155
421# define CMS_F_CMS_UNCOMPRESS 156
422# define CMS_F_CMS_VERIFY 157
423
424/* Reason codes. */
425# define CMS_R_ADD_SIGNER_ERROR 99
426# define CMS_R_CERTIFICATE_ALREADY_PRESENT 175
427# define CMS_R_CERTIFICATE_HAS_NO_KEYID 160
428# define CMS_R_CERTIFICATE_VERIFY_ERROR 100
429# define CMS_R_CIPHER_INITIALISATION_ERROR 101
430# define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102
431# define CMS_R_CMS_DATAFINAL_ERROR 103
432# define CMS_R_CMS_LIB 104
433# define CMS_R_CONTENTIDENTIFIER_MISMATCH 170
434# define CMS_R_CONTENT_NOT_FOUND 105
435# define CMS_R_CONTENT_TYPE_MISMATCH 171
436# define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106
437# define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107
438# define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108
439# define CMS_R_CONTENT_VERIFY_ERROR 109
440# define CMS_R_CTRL_ERROR 110
441# define CMS_R_CTRL_FAILURE 111
442# define CMS_R_DECRYPT_ERROR 112
443# define CMS_R_ERROR_GETTING_PUBLIC_KEY 113
444# define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114
445# define CMS_R_ERROR_SETTING_KEY 115
446# define CMS_R_ERROR_SETTING_RECIPIENTINFO 116
447# define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117
448# define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176
449# define CMS_R_INVALID_KEY_LENGTH 118
450# define CMS_R_MD_BIO_INIT_ERROR 119
451# define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120
452# define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121
453# define CMS_R_MSGSIGDIGEST_ERROR 172
454# define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162
455# define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163
456# define CMS_R_NEED_ONE_SIGNER 164
457# define CMS_R_NOT_A_SIGNED_RECEIPT 165
458# define CMS_R_NOT_ENCRYPTED_DATA 122
459# define CMS_R_NOT_KEK 123
460# define CMS_R_NOT_KEY_AGREEMENT 181
461# define CMS_R_NOT_KEY_TRANSPORT 124
462# define CMS_R_NOT_PWRI 177
463# define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125
464# define CMS_R_NO_CIPHER 126
465# define CMS_R_NO_CONTENT 127
466# define CMS_R_NO_CONTENT_TYPE 173
467# define CMS_R_NO_DEFAULT_DIGEST 128
468# define CMS_R_NO_DIGEST_SET 129
469# define CMS_R_NO_KEY 130
470# define CMS_R_NO_KEY_OR_CERT 174
471# define CMS_R_NO_MATCHING_DIGEST 131
472# define CMS_R_NO_MATCHING_RECIPIENT 132
473# define CMS_R_NO_MATCHING_SIGNATURE 166
474# define CMS_R_NO_MSGSIGDIGEST 167
475# define CMS_R_NO_PASSWORD 178
476# define CMS_R_NO_PRIVATE_KEY 133
477# define CMS_R_NO_PUBLIC_KEY 134
478# define CMS_R_NO_RECEIPT_REQUEST 168
479# define CMS_R_NO_SIGNERS 135
480# define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136
481# define CMS_R_RECEIPT_DECODE_ERROR 169
482# define CMS_R_RECIPIENT_ERROR 137
483# define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138
484# define CMS_R_SIGNFINAL_ERROR 139
485# define CMS_R_SMIME_TEXT_ERROR 140
486# define CMS_R_STORE_INIT_ERROR 141
487# define CMS_R_TYPE_NOT_COMPRESSED_DATA 142
488# define CMS_R_TYPE_NOT_DATA 143
489# define CMS_R_TYPE_NOT_DIGESTED_DATA 144
490# define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145
491# define CMS_R_TYPE_NOT_ENVELOPED_DATA 146
492# define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147
493# define CMS_R_UNKNOWN_CIPHER 148
494# define CMS_R_UNKNOWN_DIGEST_ALGORIHM 149
495# define CMS_R_UNKNOWN_ID 150
496# define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151
497# define CMS_R_UNSUPPORTED_CONTENT_TYPE 152
498# define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153
499# define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179
500# define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154
501# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE 155
502# define CMS_R_UNSUPPORTED_TYPE 156
503# define CMS_R_UNWRAP_ERROR 157
504# define CMS_R_UNWRAP_FAILURE 180
505# define CMS_R_VERIFICATION_FAILURE 158
506# define CMS_R_WRAP_ERROR 159
507
508# ifdef __cplusplus
509}
510# endif
511# endif
512#endif
Note: See TracBrowser for help on using the repository browser.