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