Skip to content

Comments

Add libctx support to CMS/PKCS7#11884

Closed
slontis wants to merge 10 commits intoopenssl:masterfrom
slontis:cms_provider_support
Closed

Add libctx support to CMS/PKCS7#11884
slontis wants to merge 10 commits intoopenssl:masterfrom
slontis:cms_provider_support

Conversation

@slontis
Copy link
Member

@slontis slontis commented May 20, 2020

Checklist
  • documentation is added or updated
  • tests are added or updated

@slontis slontis added the branch: master Applies to master branch label May 20, 2020
@slontis slontis force-pushed the cms_provider_support branch from 997f81a to ea412b3 Compare May 20, 2020 12:41
@slontis slontis changed the title WIP: Add CMS/PKCS7 provider support WIP: Add libctx support to CMS/PKCS7 May 20, 2020
@slontis slontis added the approval: review pending This pull request needs review by a committer label May 21, 2020
@slontis slontis changed the title WIP: Add libctx support to CMS/PKCS7 Add libctx support to CMS/PKCS7 May 21, 2020
@slontis
Copy link
Member Author

slontis commented Jun 13, 2020

This should be ready for review again.

@slontis
Copy link
Member Author

slontis commented Jun 14, 2020

ping

@slontis slontis mentioned this pull request Jun 15, 2020
2 tasks
@slontis slontis changed the title Add libctx support to CMS/PKCS7 [WIP]: Add libctx support to CMS/PKCS7 Jun 15, 2020
@slontis
Copy link
Member Author

slontis commented Jun 15, 2020

Changed to WIP: as it is now dependant on bits from #11948 and #12153 are merged..
It will be rebased once those dependant PR's are merged, This should make it slightly easier to review.

@slontis slontis force-pushed the cms_provider_support branch from ddc936d to 7c23c9b Compare July 26, 2020 07:49
@slontis slontis changed the title [WIP]: Add libctx support to CMS/PKCS7 Add libctx support to CMS/PKCS7 Jul 26, 2020
@slontis
Copy link
Member Author

slontis commented Jul 26, 2020

@mattcaswell
Taken out of work in progress now that the dependent PR's have been merged.
It required quite a bit of rework since the base PR for X509 changed quite a bit,
so I have also broken it up into separate logical commits.

@slontis slontis closed this Jul 26, 2020
@slontis slontis reopened this Jul 26, 2020
@slontis slontis force-pushed the cms_provider_support branch from 7c23c9b to 45d3347 Compare August 5, 2020 03:12
@slontis
Copy link
Member Author

slontis commented Aug 5, 2020

I had to search for with_libctx to fix up all the indentation and documentation. Hopefully I got them all now.

@slontis
Copy link
Member Author

slontis commented Aug 5, 2020

The last 5 commits are the fix ups after a rebase.

@slontis
Copy link
Member Author

slontis commented Aug 6, 2020

Looks like fuzzing test is generally broken at the moment.

openssl-machine pushed a commit that referenced this pull request Aug 9, 2020
-Public PKCS7 methods that create a PKCS7 object now have variants that also add a libctx and propq.
 This includes PKCS7_new_with_libctx(), PKCS7_sign_with_libctx() and PKCS7_encrypt_with_libctx()
-Added SMIME_read_PKCS7_ex() so that a created PKCS7 object can be passed to the read.
-d2i_PKCS7_bio() has been modified so that after it loads the PKCS7 object it then resolves any subobjects that require
 the libctx/propq (such as objects containing X509 certificates).

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #11884)
openssl-machine pushed a commit that referenced this pull request Aug 9, 2020
…o they use a libctx to retrieve the digest

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #11884)
openssl-machine pushed a commit that referenced this pull request Aug 9, 2020
Code is now correctly included in the fips provider.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #11884)
openssl-machine pushed a commit that referenced this pull request Aug 9, 2020
openssl-machine pushed a commit that referenced this pull request Aug 9, 2020
-Added EVP_SignFinal_with_libctx() and EVP_VerifyFinal_with_libctx()
-Renamed EVP_DigestSignInit_ex() and EVP_DigestVerifyInit_with_libctx() to
  EVP_DigestSignInit_with_libctx() and EVP_DigestVerifyInit_with_libctx()

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #11884)
openssl-machine pushed a commit that referenced this pull request Aug 9, 2020
A DHX related test has been commented out and TODO(3) added, until DHX is added correctly to a provider.
Added generated files.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #11884)
openssl-machine pushed a commit that referenced this pull request Aug 9, 2020
@slontis
Copy link
Member Author

slontis commented Aug 9, 2020

Thanks for reviewing. Finally merged to master.

@slontis slontis closed this Aug 9, 2020
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
-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 <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
This should only be called during (or right after) using d2iXXX on a object that contains embedded certificate(s)
that require a non default library context. X509_new_with_libctx() should be used if possible.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
Added SMIME_write_ASN1_with_libctx() since it fetches rand internally.
Added SMIME_read_CMS_ex() so that a created object (CMS_ContentInfo) can be passed to the read.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
-Public PKCS7 methods that create a PKCS7 object now have variants that also add a libctx and propq.
 This includes PKCS7_new_with_libctx(), PKCS7_sign_with_libctx() and PKCS7_encrypt_with_libctx()
-Added SMIME_read_PKCS7_ex() so that a created PKCS7 object can be passed to the read.
-d2i_PKCS7_bio() has been modified so that after it loads the PKCS7 object it then resolves any subobjects that require
 the libctx/propq (such as objects containing X509 certificates).

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
…o they use a libctx to retrieve the digest

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
Code is now correctly included in the fips provider.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
-Added EVP_SignFinal_with_libctx() and EVP_VerifyFinal_with_libctx()
-Renamed EVP_DigestSignInit_ex() and EVP_DigestVerifyInit_with_libctx() to
  EVP_DigestSignInit_with_libctx() and EVP_DigestVerifyInit_with_libctx()

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
A DHX related test has been commented out and TODO(3) added, until DHX is added correctly to a provider.
Added generated files.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#11884)
swenkeratmicrosoft pushed a commit to swenkeratmicrosoft/openssl that referenced this pull request Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants