Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara
Apache License 2.0
70 stars 30 forks source link

features: `openssl-static` but `yara-sys` does not have these features. #105

Closed muteb closed 1 year ago

muteb commented 1 year ago

I'm trying to compile the code with the feature vendored as well as openssl-static but I get this error. I suspect that I'm doing it wrong but I have no idea how. any help will be appreciated :).

yara = { version = "0.17.0" } yara-sys = { version = "0.17.0", features = ["bundled-4_2_3", "vendored","openssl-static"]}

error: failed to select a version for yara-sys. ... required by package sweeper v1.1.0 *** ... which satisfies path dependency sweeper (locked to 1.1.0) of package sweeper v0.1.0 *** versions that meet the requirements ^0.17.0 (locked to 0.17.0) are: 0.17.0

the package sweeper depends on yara-sys, with features: openssl-static but yara-sys does not have these features.

failed to select a version for yara-sys which could resolve this conflict

ikrivosheev commented 1 year ago

@muteb hello! Maybe I don't understand, but feature openssl-static is in yara-sys: https://github.com/Hugal31/yara-rust/blob/master/yara-sys/Cargo.toml#L27

ikrivosheev commented 1 year ago

@muteb can you show your Cargo.toml file? I think, You have older version of yara...

muteb commented 1 year ago

Thank you very much foe the quick repose. Well I have the pe model enabled in Yara rules and I need to use openssl at some stage but every time I need to do scan, I ship libcrypto-1_1-x64.dll with the app. I got really happy when adding openssl-static feature as I think it will solve the dll issue. Here is my cargo.toml:

[package]
name = "malhunt"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
yara = { version = "0.17.0" }
yara-sys = { version = "0.17.0", features = ["bundled-4_2_3", "vendored","openssl-static"]}
zip = "0.6.3"
serde = { version = "1.*", features = ["derive"] }
serde_json = { version = "1.0" }
serde_derive = "1.*"
yaml-rust = "0.4.*"
walkdir ="2.3.2"
serde_yaml = "0.9.17"
hhmmss = "*"
pbr = "*"
tokio = { version = "1", features = ["full"] }
nested="*"
chrono="*"
ikrivosheev commented 1 year ago

@muteb I get it! It doesn't release yet) Latest release was on 14 Feb, but I created PR(https://github.com/Hugal31/yara-rust/pull/104) on 3 Mar...

muteb commented 1 year ago

OK thanks alot.