Add libctx support to CMS.
authorShane Lontis <shane.lontis@oracle.com>
Sat, 25 Jul 2020 08:04:55 +0000 (18:04 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Sun, 9 Aug 2020 07:34:52 +0000 (17:34 +1000)
commitc1669f41eab0e2d9a8c2498718d06b4cd48a9890
tree00e024f0935dfa0c93e2f833e69b14bb77a819e4
parent82a7b2fb001e2ff50389d0894c276880b3bad336
Add libctx support to CMS.

-Public CMS methods that create a CMS_ContentInfo object now have variants that also add a libctx and propq.
 This includes CMS_ContentInfo_new_with_libctx(), CMS_sign_with_libctx(), CMS_data_create_with_libctx(),
 CMS_digest_create_with_libctx(), CMS_EncryptedData_encrypt_with_libctx(), CMS_EnvelopedData_create_with_libctx().
-Added CMS_ReceiptRequest_create0_with_libctx().
-Added SMIME_read_CMS_ex() so that a new CMS_ContentInfo object (created using CMS_ContentInfo_new_with_libctx()) can
be passed to the read.
-d2i_CMS_bio() has been modified so that after it loads the CMS_ContentInfo() it then resolves any subobjects that require
 the libctx/propq (such as objects containing X509 certificates).

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11884)
20 files changed:
apps/cms.c
crypto/cms/cms_cd.c
crypto/cms/cms_dd.c
crypto/cms/cms_enc.c
crypto/cms/cms_env.c
crypto/cms/cms_ess.c
crypto/cms/cms_io.c
crypto/cms/cms_kari.c
crypto/cms/cms_lib.c
crypto/cms/cms_local.h
crypto/cms/cms_pwri.c
crypto/cms/cms_sd.c
crypto/cms/cms_smime.c
doc/man1/openssl-cms.pod.in
doc/man3/CMS_EnvelopedData_create.pod
doc/man3/CMS_encrypt.pod
doc/man3/CMS_get1_ReceiptRequest.pod
doc/man3/CMS_sign.pod
doc/man3/SMIME_read_CMS.pod
include/openssl/cms.h