m4b / goblin

An impish, cross-platform binary parsing crate, written in Rust
MIT License
1.17k stars 156 forks source link

pe: support basic certificates enumeration #354

Closed RaitoBezarius closed 1 year ago

RaitoBezarius commented 1 year ago

This is a rough PR to enable basic certificate enumeration in the PE structure.

I am planning to add support to transform the string binary data into a structured format using a PKCS#7 compatible library gated behind a feature flag maybe (?).

I'm not sure my implementation is optimal, let me know if I should simplify stuff.

For tests, I was planning to add PE binaries with a certificate and multiple certificates attached, checking the number of certificates found, would that work?

Later, I am also planning for write support, including attaching arbitrary signatures.

m4b commented 1 year ago

CI failing because needs a rustfmt

RaitoBezarius commented 1 year ago

Thank you for the mindful comments, will address them :) ; do you have an opinion on the tests @m4b ?

baloo commented 1 year ago

nitpick: CertificateAttribute should probably be named AttributeCertificate as this is referred as such in the spec, but it's a nitpick.

RaitoBezarius commented 1 year ago

Thanks for the comments @baloo ; will address them in the next hours 👍

RaitoBezarius commented 1 year ago

Everything has been addressed, @m4b :)

RaitoBezarius commented 1 year ago

thank you for your patience!

it was quite fast for NixOS contributor standards :P -- thank you for your guidance

m4b commented 1 year ago

this will likely be rolled up into the 0.7 release which includes 1 minor breaking change, are you ok to wait a bit @RaitoBezarius i prefer to have at least a few changes between releases (1-2 month cadence seems the pattern). if not i could cherry-pick this into a 0.6.2 branch if it's something urgent.

RaitoBezarius commented 1 year ago

this will likely be rolled up into the 0.7 release which includes 1 minor breaking change, are you ok to wait a bit @RaitoBezarius i prefer to have at least a few changes between releases (1-2 month cadence seems the pattern). if not i could cherry-pick this into a 0.6.2 branch if it's something urgent.

can definitely wait because I want to send you more PRs on that subject so we can bundle a lot of them for this 0.7 :)

m4b commented 1 year ago

released in 0.7.0, thank you so much for your patience!