cms.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. /*
  2. * WARNING: do not edit!
  3. * Generated by makefile from include\openssl\cms.h.in
  4. *
  5. * Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved.
  6. *
  7. * Licensed under the Apache License 2.0 (the "License"). You may not use
  8. * this file except in compliance with the License. You can obtain a copy
  9. * in the file LICENSE in the source distribution or at
  10. * https://www.openssl.org/source/license.html
  11. */
  12. /* clang-format off */
  13. /* clang-format on */
  14. #ifndef OPENSSL_CMS_H
  15. #define OPENSSL_CMS_H
  16. #pragma once
  17. #include <openssl/macros.h>
  18. #ifndef OPENSSL_NO_DEPRECATED_3_0
  19. #define HEADER_CMS_H
  20. #endif
  21. #include <openssl/opensslconf.h>
  22. #ifndef OPENSSL_NO_CMS
  23. #include <openssl/x509.h>
  24. #include <openssl/x509v3.h>
  25. #include <openssl/cmserr.h>
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
  30. typedef struct CMS_ContentInfo_st CMS_ContentInfo;
  31. typedef struct CMS_SignerInfo_st CMS_SignerInfo;
  32. typedef struct CMS_SignedData_st CMS_SignedData;
  33. typedef struct CMS_CertificateChoices CMS_CertificateChoices;
  34. typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
  35. typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
  36. typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
  37. typedef struct CMS_Receipt_st CMS_Receipt;
  38. typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
  39. typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
  40. /* clang-format off */
  41. SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
  42. #define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
  43. #define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
  44. #define sk_CMS_SignerInfo_new(cmp) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new(ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
  45. #define sk_CMS_SignerInfo_new_null() ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_null())
  46. #define sk_CMS_SignerInfo_new_reserve(cmp, n) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_SignerInfo_compfunc_type(cmp), (n)))
  47. #define sk_CMS_SignerInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_SignerInfo_sk_type(sk), (n))
  48. #define sk_CMS_SignerInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_SignerInfo_sk_type(sk))
  49. #define sk_CMS_SignerInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_SignerInfo_sk_type(sk))
  50. #define sk_CMS_SignerInfo_delete(sk, i) ((CMS_SignerInfo *)OPENSSL_sk_delete(ossl_check_CMS_SignerInfo_sk_type(sk), (i)))
  51. #define sk_CMS_SignerInfo_delete_ptr(sk, ptr) ((CMS_SignerInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr)))
  52. #define sk_CMS_SignerInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
  53. #define sk_CMS_SignerInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
  54. #define sk_CMS_SignerInfo_pop(sk) ((CMS_SignerInfo *)OPENSSL_sk_pop(ossl_check_CMS_SignerInfo_sk_type(sk)))
  55. #define sk_CMS_SignerInfo_shift(sk) ((CMS_SignerInfo *)OPENSSL_sk_shift(ossl_check_CMS_SignerInfo_sk_type(sk)))
  56. #define sk_CMS_SignerInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_freefunc_type(freefunc))
  57. #define sk_CMS_SignerInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), (idx))
  58. #define sk_CMS_SignerInfo_set(sk, idx, ptr) ((CMS_SignerInfo *)OPENSSL_sk_set(ossl_check_CMS_SignerInfo_sk_type(sk), (idx), ossl_check_CMS_SignerInfo_type(ptr)))
  59. #define sk_CMS_SignerInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
  60. #define sk_CMS_SignerInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
  61. #define sk_CMS_SignerInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), pnum)
  62. #define sk_CMS_SignerInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_SignerInfo_sk_type(sk))
  63. #define sk_CMS_SignerInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_SignerInfo_sk_type(sk))
  64. #define sk_CMS_SignerInfo_dup(sk) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_SignerInfo_sk_type(sk)))
  65. #define sk_CMS_SignerInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_copyfunc_type(copyfunc), ossl_check_CMS_SignerInfo_freefunc_type(freefunc)))
  66. #define sk_CMS_SignerInfo_set_cmp_func(sk, cmp) ((sk_CMS_SignerInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
  67. SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey)
  68. #define sk_CMS_RecipientEncryptedKey_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
  69. #define sk_CMS_RecipientEncryptedKey_value(sk, idx) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), (idx)))
  70. #define sk_CMS_RecipientEncryptedKey_new(cmp) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
  71. #define sk_CMS_RecipientEncryptedKey_new_null() ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_null())
  72. #define sk_CMS_RecipientEncryptedKey_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp), (n)))
  73. #define sk_CMS_RecipientEncryptedKey_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (n))
  74. #define sk_CMS_RecipientEncryptedKey_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
  75. #define sk_CMS_RecipientEncryptedKey_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
  76. #define sk_CMS_RecipientEncryptedKey_delete(sk, i) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (i)))
  77. #define sk_CMS_RecipientEncryptedKey_delete_ptr(sk, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
  78. #define sk_CMS_RecipientEncryptedKey_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
  79. #define sk_CMS_RecipientEncryptedKey_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
  80. #define sk_CMS_RecipientEncryptedKey_pop(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_pop(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
  81. #define sk_CMS_RecipientEncryptedKey_shift(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_shift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
  82. #define sk_CMS_RecipientEncryptedKey_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc))
  83. #define sk_CMS_RecipientEncryptedKey_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), (idx))
  84. #define sk_CMS_RecipientEncryptedKey_set(sk, idx, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_set(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (idx), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
  85. #define sk_CMS_RecipientEncryptedKey_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
  86. #define sk_CMS_RecipientEncryptedKey_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
  87. #define sk_CMS_RecipientEncryptedKey_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), pnum)
  88. #define sk_CMS_RecipientEncryptedKey_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
  89. #define sk_CMS_RecipientEncryptedKey_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
  90. #define sk_CMS_RecipientEncryptedKey_dup(sk) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk)))
  91. #define sk_CMS_RecipientEncryptedKey_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_copyfunc_type(copyfunc), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc)))
  92. #define sk_CMS_RecipientEncryptedKey_set_cmp_func(sk, cmp) ((sk_CMS_RecipientEncryptedKey_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
  93. SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientInfo, CMS_RecipientInfo, CMS_RecipientInfo)
  94. #define sk_CMS_RecipientInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
  95. #define sk_CMS_RecipientInfo_value(sk, idx) ((CMS_RecipientInfo *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientInfo_sk_type(sk), (idx)))
  96. #define sk_CMS_RecipientInfo_new(cmp) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new(ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
  97. #define sk_CMS_RecipientInfo_new_null() ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_null())
  98. #define sk_CMS_RecipientInfo_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientInfo_compfunc_type(cmp), (n)))
  99. #define sk_CMS_RecipientInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientInfo_sk_type(sk), (n))
  100. #define sk_CMS_RecipientInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientInfo_sk_type(sk))
  101. #define sk_CMS_RecipientInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientInfo_sk_type(sk))
  102. #define sk_CMS_RecipientInfo_delete(sk, i) ((CMS_RecipientInfo *)OPENSSL_sk_delete(ossl_check_CMS_RecipientInfo_sk_type(sk), (i)))
  103. #define sk_CMS_RecipientInfo_delete_ptr(sk, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr)))
  104. #define sk_CMS_RecipientInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
  105. #define sk_CMS_RecipientInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
  106. #define sk_CMS_RecipientInfo_pop(sk) ((CMS_RecipientInfo *)OPENSSL_sk_pop(ossl_check_CMS_RecipientInfo_sk_type(sk)))
  107. #define sk_CMS_RecipientInfo_shift(sk) ((CMS_RecipientInfo *)OPENSSL_sk_shift(ossl_check_CMS_RecipientInfo_sk_type(sk)))
  108. #define sk_CMS_RecipientInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc))
  109. #define sk_CMS_RecipientInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), (idx))
  110. #define sk_CMS_RecipientInfo_set(sk, idx, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_set(ossl_check_CMS_RecipientInfo_sk_type(sk), (idx), ossl_check_CMS_RecipientInfo_type(ptr)))
  111. #define sk_CMS_RecipientInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
  112. #define sk_CMS_RecipientInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
  113. #define sk_CMS_RecipientInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), pnum)
  114. #define sk_CMS_RecipientInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientInfo_sk_type(sk))
  115. #define sk_CMS_RecipientInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
  116. #define sk_CMS_RecipientInfo_dup(sk) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientInfo_sk_type(sk)))
  117. #define sk_CMS_RecipientInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_copyfunc_type(copyfunc), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc)))
  118. #define sk_CMS_RecipientInfo_set_cmp_func(sk, cmp) ((sk_CMS_RecipientInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
  119. SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice, CMS_RevocationInfoChoice)
  120. #define sk_CMS_RevocationInfoChoice_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
  121. #define sk_CMS_RevocationInfoChoice_value(sk, idx) ((CMS_RevocationInfoChoice *)OPENSSL_sk_value(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), (idx)))
  122. #define sk_CMS_RevocationInfoChoice_new(cmp) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
  123. #define sk_CMS_RevocationInfoChoice_new_null() ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_null())
  124. #define sk_CMS_RevocationInfoChoice_new_reserve(cmp, n) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp), (n)))
  125. #define sk_CMS_RevocationInfoChoice_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (n))
  126. #define sk_CMS_RevocationInfoChoice_free(sk) OPENSSL_sk_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
  127. #define sk_CMS_RevocationInfoChoice_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
  128. #define sk_CMS_RevocationInfoChoice_delete(sk, i) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (i)))
  129. #define sk_CMS_RevocationInfoChoice_delete_ptr(sk, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
  130. #define sk_CMS_RevocationInfoChoice_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
  131. #define sk_CMS_RevocationInfoChoice_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
  132. #define sk_CMS_RevocationInfoChoice_pop(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_pop(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
  133. #define sk_CMS_RevocationInfoChoice_shift(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_shift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
  134. #define sk_CMS_RevocationInfoChoice_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc))
  135. #define sk_CMS_RevocationInfoChoice_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), (idx))
  136. #define sk_CMS_RevocationInfoChoice_set(sk, idx, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_set(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (idx), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
  137. #define sk_CMS_RevocationInfoChoice_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
  138. #define sk_CMS_RevocationInfoChoice_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
  139. #define sk_CMS_RevocationInfoChoice_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), pnum)
  140. #define sk_CMS_RevocationInfoChoice_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
  141. #define sk_CMS_RevocationInfoChoice_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
  142. #define sk_CMS_RevocationInfoChoice_dup(sk) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_dup(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk)))
  143. #define sk_CMS_RevocationInfoChoice_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_copyfunc_type(copyfunc), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc)))
  144. #define sk_CMS_RevocationInfoChoice_set_cmp_func(sk, cmp) ((sk_CMS_RevocationInfoChoice_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
  145. /* clang-format on */
  146. DECLARE_ASN1_ITEM(CMS_EnvelopedData)
  147. DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
  148. DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
  149. DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
  150. DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
  151. DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
  152. CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
  153. #define CMS_SIGNERINFO_ISSUER_SERIAL 0
  154. #define CMS_SIGNERINFO_KEYIDENTIFIER 1
  155. #define CMS_RECIPINFO_NONE -1
  156. #define CMS_RECIPINFO_TRANS 0
  157. #define CMS_RECIPINFO_AGREE 1
  158. #define CMS_RECIPINFO_KEK 2
  159. #define CMS_RECIPINFO_PASS 3
  160. #define CMS_RECIPINFO_OTHER 4
  161. #define CMS_RECIPINFO_KEM 5
  162. /* S/MIME related flags */
  163. #define CMS_TEXT 0x1
  164. #define CMS_NOCERTS 0x2
  165. #define CMS_NO_CONTENT_VERIFY 0x4
  166. #define CMS_NO_ATTR_VERIFY 0x8
  167. #define CMS_NOSIGS \
  168. (CMS_NO_CONTENT_VERIFY | CMS_NO_ATTR_VERIFY)
  169. #define CMS_NOINTERN 0x10
  170. #define CMS_NO_SIGNER_CERT_VERIFY 0x20
  171. #define CMS_NOVERIFY 0x20
  172. #define CMS_DETACHED 0x40
  173. #define CMS_BINARY 0x80
  174. #define CMS_NOATTR 0x100
  175. #define CMS_NOSMIMECAP 0x200
  176. #define CMS_NOOLDMIMETYPE 0x400
  177. #define CMS_CRLFEOL 0x800
  178. #define CMS_STREAM 0x1000
  179. #define CMS_NOCRL 0x2000
  180. #define CMS_PARTIAL 0x4000
  181. #define CMS_REUSE_DIGEST 0x8000
  182. #define CMS_USE_KEYID 0x10000
  183. #define CMS_DEBUG_DECRYPT 0x20000
  184. #define CMS_KEY_PARAM 0x40000
  185. #define CMS_ASCIICRLF 0x80000
  186. #define CMS_CADES 0x100000
  187. #define CMS_USE_ORIGINATOR_KEYID 0x200000
  188. #define CMS_NO_SIGNING_TIME 0x400000
  189. const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
  190. BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
  191. int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
  192. ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
  193. int CMS_is_detached(CMS_ContentInfo *cms);
  194. int CMS_set_detached(CMS_ContentInfo *cms, int detached);
  195. #ifdef OPENSSL_PEM_H
  196. DECLARE_PEM_rw(CMS, CMS_ContentInfo)
  197. #endif
  198. int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
  199. CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
  200. int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
  201. BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
  202. int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
  203. int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
  204. int flags);
  205. CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
  206. CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
  207. int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
  208. int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
  209. unsigned int flags);
  210. int CMS_final_digest(CMS_ContentInfo *cms,
  211. const unsigned char *md, unsigned int mdlen, BIO *dcont,
  212. unsigned int flags);
  213. CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
  214. STACK_OF(X509) *certs, BIO *data,
  215. unsigned int flags);
  216. CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
  217. STACK_OF(X509) *certs, BIO *data,
  218. unsigned int flags, OSSL_LIB_CTX *libctx,
  219. const char *propq);
  220. CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
  221. X509 *signcert, EVP_PKEY *pkey,
  222. STACK_OF(X509) *certs, unsigned int flags);
  223. int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
  224. CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
  225. CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
  226. OSSL_LIB_CTX *libctx, const char *propq);
  227. int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
  228. unsigned int flags);
  229. CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
  230. unsigned int flags);
  231. CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
  232. unsigned int flags, OSSL_LIB_CTX *libctx,
  233. const char *propq);
  234. int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
  235. const unsigned char *key, size_t keylen,
  236. BIO *dcont, BIO *out, unsigned int flags);
  237. CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
  238. const unsigned char *key,
  239. size_t keylen, unsigned int flags);
  240. CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
  241. const unsigned char *key,
  242. size_t keylen, unsigned int flags,
  243. OSSL_LIB_CTX *libctx,
  244. const char *propq);
  245. int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
  246. const unsigned char *key, size_t keylen);
  247. int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
  248. X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
  249. int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
  250. STACK_OF(X509) *certs,
  251. X509_STORE *store, unsigned int flags);
  252. STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
  253. CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
  254. const EVP_CIPHER *cipher, unsigned int flags);
  255. CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
  256. const EVP_CIPHER *cipher, unsigned int flags,
  257. OSSL_LIB_CTX *libctx, const char *propq);
  258. int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
  259. BIO *dcont, BIO *out, unsigned int flags);
  260. int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
  261. int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
  262. X509 *cert, X509 *peer);
  263. int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
  264. unsigned char *key, size_t keylen,
  265. const unsigned char *id, size_t idlen);
  266. int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
  267. unsigned char *pass, ossl_ssize_t passlen);
  268. STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
  269. int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
  270. EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
  271. CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
  272. CMS_ContentInfo *
  273. CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
  274. const char *propq);
  275. CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
  276. CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
  277. OSSL_LIB_CTX *libctx,
  278. const char *propq);
  279. BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
  280. EVP_PKEY *pkey, X509 *cert,
  281. ASN1_OCTET_STRING *secret, unsigned int flags,
  282. OSSL_LIB_CTX *libctx, const char *propq);
  283. CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
  284. X509 *recip, unsigned int flags);
  285. CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
  286. EVP_PKEY *originatorPrivKey, X509 *originator, unsigned int flags);
  287. int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
  288. int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
  289. int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
  290. EVP_PKEY **pk, X509 **recip,
  291. X509_ALGOR **palg);
  292. int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
  293. ASN1_OCTET_STRING **keyid,
  294. X509_NAME **issuer,
  295. ASN1_INTEGER **sno);
  296. CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
  297. unsigned char *key, size_t keylen,
  298. unsigned char *id, size_t idlen,
  299. ASN1_GENERALIZEDTIME *date,
  300. ASN1_OBJECT *otherTypeId,
  301. ASN1_TYPE *otherType);
  302. int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
  303. X509_ALGOR **palg,
  304. ASN1_OCTET_STRING **pid,
  305. ASN1_GENERALIZEDTIME **pdate,
  306. ASN1_OBJECT **potherid,
  307. ASN1_TYPE **pothertype);
  308. int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
  309. unsigned char *key, size_t keylen);
  310. int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
  311. const unsigned char *id, size_t idlen);
  312. int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
  313. unsigned char *pass,
  314. ossl_ssize_t passlen);
  315. CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
  316. int iter, int wrap_nid,
  317. int pbe_nid,
  318. unsigned char *pass,
  319. ossl_ssize_t passlen,
  320. const EVP_CIPHER *kekciph);
  321. int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
  322. int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
  323. int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
  324. unsigned int flags);
  325. CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
  326. int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
  327. const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
  328. CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
  329. int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
  330. int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
  331. STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
  332. CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
  333. int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
  334. int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
  335. STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
  336. int CMS_SignedData_init(CMS_ContentInfo *cms);
  337. CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
  338. X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
  339. unsigned int flags);
  340. EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
  341. EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
  342. STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
  343. void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
  344. int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
  345. ASN1_OCTET_STRING **keyid,
  346. X509_NAME **issuer, ASN1_INTEGER **sno);
  347. int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
  348. int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
  349. unsigned int flags);
  350. void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
  351. X509 **signer, X509_ALGOR **pdig,
  352. X509_ALGOR **psig);
  353. ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
  354. int CMS_SignerInfo_sign(CMS_SignerInfo *si);
  355. int CMS_SignerInfo_verify(CMS_SignerInfo *si);
  356. int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
  357. BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
  358. STACK_OF(X509) *scerts, X509_STORE *store,
  359. STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
  360. unsigned int flags,
  361. OSSL_LIB_CTX *libctx, const char *propq);
  362. int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
  363. int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
  364. int algnid, int keysize);
  365. int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
  366. int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
  367. int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
  368. int lastpos);
  369. int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
  370. int lastpos);
  371. X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
  372. X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
  373. int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
  374. int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
  375. const ASN1_OBJECT *obj, int type,
  376. const void *bytes, int len);
  377. int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
  378. int nid, int type,
  379. const void *bytes, int len);
  380. int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
  381. const char *attrname, int type,
  382. const void *bytes, int len);
  383. void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
  384. const ASN1_OBJECT *oid,
  385. int lastpos, int type);
  386. int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
  387. int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
  388. int lastpos);
  389. int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
  390. const ASN1_OBJECT *obj, int lastpos);
  391. X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
  392. X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
  393. int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
  394. int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
  395. const ASN1_OBJECT *obj, int type,
  396. const void *bytes, int len);
  397. int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
  398. int nid, int type,
  399. const void *bytes, int len);
  400. int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
  401. const char *attrname, int type,
  402. const void *bytes, int len);
  403. void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
  404. int lastpos, int type);
  405. int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
  406. CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
  407. unsigned char *id, int idlen, int allorfirst,
  408. STACK_OF(GENERAL_NAMES) *receiptList,
  409. STACK_OF(GENERAL_NAMES) *receiptsTo);
  410. CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
  411. unsigned char *id, int idlen, int allorfirst,
  412. STACK_OF(GENERAL_NAMES) *receiptList,
  413. STACK_OF(GENERAL_NAMES) *receiptsTo,
  414. OSSL_LIB_CTX *libctx);
  415. int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
  416. void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
  417. ASN1_STRING **pcid,
  418. int *pallorfirst,
  419. STACK_OF(GENERAL_NAMES) **plist,
  420. STACK_OF(GENERAL_NAMES) **prto);
  421. int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
  422. X509_ALGOR **palg,
  423. ASN1_OCTET_STRING **pukm);
  424. STACK_OF(CMS_RecipientEncryptedKey)
  425. *CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
  426. int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
  427. X509_ALGOR **pubalg,
  428. ASN1_BIT_STRING **pubkey,
  429. ASN1_OCTET_STRING **keyid,
  430. X509_NAME **issuer,
  431. ASN1_INTEGER **sno);
  432. int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
  433. int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
  434. ASN1_OCTET_STRING **keyid,
  435. ASN1_GENERALIZEDTIME **tm,
  436. CMS_OtherKeyAttribute **other,
  437. X509_NAME **issuer, ASN1_INTEGER **sno);
  438. int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
  439. X509 *cert);
  440. int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
  441. int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
  442. EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
  443. int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
  444. CMS_RecipientInfo *ri,
  445. CMS_RecipientEncryptedKey *rek);
  446. int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
  447. ASN1_OCTET_STRING *ukm, int keylen);
  448. int CMS_RecipientInfo_kemri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
  449. int CMS_RecipientInfo_kemri_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
  450. EVP_CIPHER_CTX *CMS_RecipientInfo_kemri_get0_ctx(CMS_RecipientInfo *ri);
  451. X509_ALGOR *CMS_RecipientInfo_kemri_get0_kdf_alg(CMS_RecipientInfo *ri);
  452. int CMS_RecipientInfo_kemri_set_ukm(CMS_RecipientInfo *ri,
  453. const unsigned char *ukm,
  454. int ukmLength);
  455. /* Backward compatibility for spelling errors. */
  456. #define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
  457. #define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
  458. CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
  459. #ifdef __cplusplus
  460. }
  461. #endif
  462. #endif
  463. #endif