trailofbits / uthenticode

A cross-platform library for verifying Authenticode signatures
https://trailofbits.github.io/uthenticode/
MIT License
138 stars 33 forks source link

Not all used headers are explicitly included #96

Open hugmyndakassi opened 8 months ago

hugmyndakassi commented 8 months ago

Hi,

wanted to bring another point to your attention.

I think you are technically missing an #include <stdexcept> in uthenticode.h between <optional> and <vector>. This doesn't cause an issue because evidently <optional> transiently includes <stdexcept>.

Furthermore at least for me an #include <openssl/bn.h> was missing as well in that same header. Without it I get an error for using BN_ptr = std::unique_ptr<BIGNUM, decltype(&BN_free)>;. This may be owed to the fact that I have adjusted the code in various places and bring some stuff into scope before including uthenticode and hide other stuff from it. I also don't make use of your #include <pe-parse/parse.h> ... it may play into that as well.

woodruffw commented 8 months ago

Thanks! Yeah, any implicit header inclusions are unintentional. I'd be happy to accept a PR that makes them explicit.