Skip to content

attach-signature flow moved to digest-only verification semantics#492

Merged
mtrojnar merged 1 commit intomtrojnar:masterfrom
olszomal:attach
Apr 2, 2026
Merged

attach-signature flow moved to digest-only verification semantics#492
mtrojnar merged 1 commit intomtrojnar:masterfrom
olszomal:attach

Conversation

@olszomal
Copy link
Copy Markdown
Collaborator

@olszomal olszomal commented Apr 1, 2026

Pull Request Type

  • Bug fix
  • New feature
  • Code style / formatting / renaming
  • Refactoring (no functional or API changes)
  • Build / CI related changes
  • Documentation
  • Other (please describe):

Related Issue

Fixes #491

Current Behavior

  • attach-signature used full verification (including signature validation).
  • Failures could depend on external verification setup (CA/CRL/TSA).
  • Output file was kept even if verification failed.

New Behavior

  • attach-signature uses digest-only verification.
  • Verifies only content/digest consistency with PKCS#7.
  • Output file is removed if digest verification fails.

Scope of Changes

  • Added digest-only mode to verify_signed_file().
  • PKCS#7 extraction logic refactored into helper functions.

Testing

  • Existing tests
  • New tests added
  • Manual testing

Additional Notes

License Declaration

  • I hereby agree to license my contribution under the project's license.

@mtrojnar
Copy link
Copy Markdown
Owner

mtrojnar commented Apr 1, 2026

verify_flag seems vague. What about verify_signature?

attach-signature now uses digest-only verification instead of full
signature validation; output file is not kept if digest verification fails
@olszomal olszomal changed the title attach-signature: add digest-only verification and enforce output integrity attach-signature flow moved to digest-only verification semantics Apr 2, 2026
@mtrojnar mtrojnar merged commit bdde956 into mtrojnar:master Apr 2, 2026
10 checks passed
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.

Add options to disable CRL checks and trust verification in extract and attach flows for offline/private PKI use in osslsigncode

2 participants