Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMS_ContentInfo_free setting "content type not enveloped data" error for signed content #21676

Closed
wants to merge 3 commits into from

Conversation

obatysh
Copy link
Contributor

@obatysh obatysh commented Aug 7, 2023

CLA: provided

CMS_ContentInfo_free called ossl_cms_get0_env_enc_content, which called cms_get_enveloped_type, which raised error CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA for the content info if it contained only signed data.

Checklist
  • tests are added or updated

@openssl-machine openssl-machine added the hold: cla required The contributor needs to submit a license agreement label Aug 7, 2023
crypto/cms/cms_lib.c Outdated Show resolved Hide resolved
@openssl-machine openssl-machine removed the hold: cla required The contributor needs to submit a license agreement label Aug 8, 2023
@obatysh
Copy link
Contributor Author

obatysh commented Aug 8, 2023

Also happens on 3.1 branch

@slontis slontis added branch: master Merge to master branch approval: review pending This pull request needs review by a committer approval: otc review pending This pull request needs review by an OTC member labels Aug 8, 2023
@slontis
Copy link
Member

slontis commented Aug 8, 2023

Should this go back to 3.1 and 3.0?

@slontis
Copy link
Member

slontis commented Aug 8, 2023

I probably had too much input into this to approve it.. Other committers will need to approve.

crypto/cms/cms_env.c Outdated Show resolved Hide resolved
crypto/cms/cms_env.c Outdated Show resolved Hide resolved
@mattcaswell mattcaswell added branch: 3.0 Merge to openssl-3.0 branch branch: 3.1 Merge to openssl-3.1 tests: present The PR has suitable tests present labels Aug 8, 2023
@mattcaswell
Copy link
Member

Should this go back to 3.1 and 3.0?

Yes, probably.

@mattcaswell mattcaswell removed the approval: otc review pending This pull request needs review by an OTC member label Aug 8, 2023
@t8m t8m added the triaged: bug The issue/pr is/fixes a bug label Aug 8, 2023
@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Aug 8, 2023
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Aug 9, 2023
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@t8m
Copy link
Member

t8m commented Aug 10, 2023

Squashed and merged to master, 3.0 and 3.1 branches. Thank you for your contribution.

@t8m t8m closed this Aug 10, 2023
openssl-machine pushed a commit that referenced this pull request Aug 10, 2023
…ntInfo_free

This happens if this function is called for signed content.

Added ossl_cms_env_enc_content_free() for cleaning enveloped content.

Fixed indentation in ossl_cms_env_enc_content_free

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #21676)
openssl-machine pushed a commit that referenced this pull request Aug 10, 2023
…ntInfo_free

This happens if this function is called for signed content.

Added ossl_cms_env_enc_content_free() for cleaning enveloped content.

Fixed indentation in ossl_cms_env_enc_content_free

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #21676)

(cherry picked from commit 13342ef)
openssl-machine pushed a commit that referenced this pull request Aug 10, 2023
…ntInfo_free

This happens if this function is called for signed content.

Added ossl_cms_env_enc_content_free() for cleaning enveloped content.

Fixed indentation in ossl_cms_env_enc_content_free

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #21676)

(cherry picked from commit 13342ef)
xl32 pushed a commit to xl32/openssl that referenced this pull request Sep 29, 2023
…ntInfo_free

This happens if this function is called for signed content.

Added ossl_cms_env_enc_content_free() for cleaning enveloped content.

Fixed indentation in ossl_cms_env_enc_content_free

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#21676)

(cherry picked from commit 13342ef)
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 Merge to master branch branch: 3.0 Merge to openssl-3.0 branch branch: 3.1 Merge to openssl-3.1 tests: present The PR has suitable tests present triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants