Skip to content

PKCS7: accept any BIO type for detached content in PKCS7_verify - #11373

Open
kojo1 wants to merge 2 commits into
wolfSSL:masterfrom
kojo1:pkcs7
Open

PKCS7: accept any BIO type for detached content in PKCS7_verify#11373
kojo1 wants to merge 2 commits into
wolfSSL:masterfrom
kojo1:pkcs7

Conversation

@kojo1

@kojo1 kojo1 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

wolfSSL_PKCS7_verify() pulled the detached content out of the input
BIO with wolfSSL_BIO_get_mem_data(), which only handles memory BIOs.
With a file BIO it returned 0 bytes instead of an error, so the
content was treated as empty and verification failed. The returned
pointer also came from the WOLFSSL_BIO ptr union, which holds the
XFILE handle for a file BIO.

Fixes zd#22345

Testing

Added test_wolfSSL_PKCS7_verify_detached_bio()

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m4

  • FLASH: .text +128 B (+0.1%, 204,893 B / 262,144 B, total: 78% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata -80 B, .text +1,408 B (+0.2%, 782,236 B / 1,048,576 B, total: 75% used)

gcc-arm-cortex-m4-pkcs7

  • FLASH: .text +64 B (+0.0%, 217,628 B / 262,144 B, total: 83% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +128 B (+0.0%, 331,936 B / 1,048,576 B, total: 32% used)

gcc-arm-cortex-m7

  • FLASH: .text +128 B (+0.1%, 204,893 B / 262,144 B, total: 78% used)

linuxkm-pie

  • Data: __patchable_function_entries +8 B (+0.0%, 26,992 B)

linuxkm-standard

@kojo1
kojo1 requested a review from wolfSSL-Bot September 5, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant