Skip to content
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

OpenSSL will always be included, even if module-hash is not enabled #128

Open
nbigaouette opened this issue Sep 8, 2023 · 1 comment
Open

Comments

@nbigaouette
Copy link

The module-hash cargo feature controls if the hash module in yara is compiled or not. That module exposes hashing functionality through OpenSSL.

For a project I do not need hashing functionality and I don't want to include OpenSSL, so I disable the yara-rusts module-hash cargo feature, but then building yara fails with the error:

error: could not find native static library `ssl`, perhaps an -L flag is missing?

After investigation, it seems that we need to also set the environment variable YARA_CRYPTO_LIB=disable so that yara-sys doesn't include it.

Could it be possible to automatically set YARA_CRYPTO_LIB=disable when the module-hash cargo feature is not enabled? That would require a build.rs for yara-rust with that logic.

@ikrivosheev
Copy link
Contributor

@nbigaouette hello! Not only module-hash requires OpenSSL. For example some part of pe module also required OpenSSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants