Skip to content

Fix several codesign feature bugs#1478

Merged
val-ms merged 3 commits into
Cisco-Talos:mainfrom
val-ms:codesign-fixes-sys_rs
Mar 31, 2025
Merged

Fix several codesign feature bugs#1478
val-ms merged 3 commits into
Cisco-Talos:mainfrom
val-ms:codesign-fixes-sys_rs

Conversation

@val-ms
Copy link
Copy Markdown
Contributor

@val-ms val-ms commented Mar 30, 2025

  • We were signing with the signing key + signing cert and verifying with the intermediate cert + root cert. However, we should have been signing with the signing key + signing cert + intermediate cert, and verifying with just the root cert.
    To fix this, I...

    1. Provided new certs and test file .sign files to use the correct signing method.
    2. Restructured the unit_tests/input/signing directory to highlight which files are for signing and which are for verification.
  • There is a multi-arch build issue because I previously used i8 to represent a C character. I switched it to c_char, which should fix the clamav-debian multi-arch Docker image build.

  • It turns out we weren't failing out when signing if one of the provided intermediate certificate paths is incorrect. Instead of using filter_map(), I switched to just iterate the list to populate the vector of intermediate certs.

  • Update generated Rust sys.rs interface.

  • Update Rust dependencies in Cargo.lock file to latest versions

val-ms added 3 commits March 29, 2025 20:38
We were signing with the signing key + signing cert and verifying
with the intermediate cert + root cert. However, we should have been
signing with the signing key + signing cert + intermediate cert, and
verifying with just the root cert.
To fix this, I...
1. Provided new certs and test file .sign files to use the correct
   signing method.
2. Restructured the `unit_tests/input/signing` directory to highlight
   which files are for signing and which are for verification.

There is a multi-arch build issue because I previously used i8 to
represent a C character. I switched it to c_char, which should fix the
clamav-debian multi-arch Docker image build.

It turns out we weren't failing out when signing if one of the provided
intermediate certificate paths is incorrect. Instead of using
`filter_map()`, I switched to just iterate the list to populate the
vector of intermediate certs.
@val-ms val-ms merged commit 00886ee into Cisco-Talos:main Mar 31, 2025
@val-ms val-ms deleted the codesign-fixes-sys_rs branch March 31, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants