Skip to content

Commit

Permalink
codesign verify: record the common name from the signing cert for the…
Browse files Browse the repository at this point in the history
… 'signed by' message
  • Loading branch information
micahsnyder committed Dec 11, 2024
1 parent 408b85d commit c1099f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libclamav_rust/src/codesign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,11 @@ impl Verifier {
let signer = cert
.subject_name()
.entries()
.next()
.find(|name_entry| {
name_entry.object().nid() == openssl::nid::Nid::COMMONNAME
})
.ok_or(Error::InvalidDigitalSignature(
"Certificate does not have any name entries".to_string(),
"Certificate in the signature's cert stack does not have a Common Name entry".to_string(),
))?
.data()
.as_utf8()?
Expand Down

0 comments on commit c1099f9

Please sign in to comment.