-
Notifications
You must be signed in to change notification settings - Fork 166
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
pe: add authenticode support #358
Conversation
37e49e6
to
39eadb5
Compare
4ef7f0d
to
48adabc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicks but amazing <3. Thank you so much!
@@ -29,6 +31,11 @@ use log::debug; | |||
#[derive(Debug)] | |||
/// An analyzed PE32/PE32+ binary | |||
pub struct PE<'a> { | |||
#[cfg(feature = "pe_source")] | |||
/// Underlying bytes | |||
bytes: &'a [u8], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so sure about this, what would be the rationale to introduce this vs. just letting the caller passing the original bytes around?
I will let @m4b weighs on as I don't have fully context on the design goals of the library.
e21d5c5
to
b322e50
Compare
Authenticode is the hashing format used to sign PE binaries. This provides the hash to be signed.
b322e50
to
a2f65e3
Compare
For similar reasons I've noted in #360 it's going to take some serious convincing to add more deps to goblin. |
I get the point about not adding dependencies to goblin itself. I'd be more than happy to implement those as trait and get that implemented in a dependency of both I think it would also be nice to have the "source bytes" in the PE objects, if you're alright with that. Anyway, thanks for maintaining goblin in the first place. |
(made an alternative in #362) |
Authenticode is the hashing format used to sign PE binaries. This provides the hash to be signed.
Usage:
Fixes #355
cc @RaitoBezarius