Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara
Apache License 2.0
73 stars 29 forks source link

feat: add include path to openssl in vendored mode #98

Closed vthib closed 1 year ago

vthib commented 1 year ago

If OpenSSL's headers are not installed in a standard path, compiling yara in vendored mode with YARA_CRYPTO_LIB=openssl is not possible, as there is no way to provide the include path for OpenSSL (only OPENSSL_LIB_DIR is available, but no OPENSSL_INCLUDE_DIR).

Fix this by:

This is done so that the behavior aligns with the rust bindings for openssl: https://docs.rs/openssl/latest/openssl/#manual

This way, if a crate uses both the openssl and the yara crate, setting those env variables will work for both.

ikrivosheev commented 1 year ago

@vthib hello! Tests had failed for posix...

vthib commented 1 year ago

I don't think the fail is related, it looks to be random. It also happened on my other PR on a windows test: https://github.com/Hugal31/yara-rust/actions/runs/4048307290/jobs/6963383583 and this test passed on a second run.

I cannot run the failed tests on my own, but can someone rerun it to see if it happens again?

Hugal31 commented 1 year ago

I don't think the fail is related, it looks to be random. It also happened on my other PR on a windows test: https://github.com/Hugal31/yara-rust/actions/runs/4048307290/jobs/6963383583 and this test passed on a second run.

I cannot run the failed tests on my own, but can someone rerun it to see if it happens again?

Indeed. I thought this only happened on Windows though...

LGTM, thanks !