diff options
author | Vincent Breitmoser <look@my.amazin.horse> | 2024-01-24 17:00:03 +0100 |
---|---|---|
committer | Vincent Breitmoser <look@my.amazin.horse> | 2024-01-26 15:35:37 +0100 |
commit | dfafe5cdb78054b980b057450afb429266c9bdd5 (patch) | |
tree | b08b09ef4a01ca6462709763ae2c42335855dcd7 | |
parent | 45c6fcf2162e44e81cd389e306cc1f7d0babaa67 (diff) |
cargo: use openssl crypo backend
-rw-r--r-- | Cargo.lock | 173 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | database/Cargo.toml | 2 | ||||
-rw-r--r-- | docker-build/Dockerfile | 2 | ||||
-rw-r--r-- | hagridctl/Cargo.toml | 2 | ||||
-rw-r--r-- | shell.nix | 1 |
7 files changed, 60 insertions, 124 deletions
@@ -198,26 +198,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" [[package]] -name = "bindgen" -version = "0.68.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" -dependencies = [ - "bitflags 2.4.1", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "proc-macro2 1.0.71", - "quote 1.0.33", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.43", -] - -[[package]] name = "bit-set" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -307,15 +287,6 @@ dependencies = [ ] [[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -342,17 +313,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "498d20a7aaf62625b9bf26e637cf7736417cde1d0c99f1d04d1170229a85cf87" [[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] name = "clap" version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -709,6 +669,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] name = "fs2" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1362,12 +1337,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] name = "lettre" version = "0.10.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1392,16 +1361,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] name = "libredox" version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1523,12 +1482,6 @@ dependencies = [ ] [[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] name = "miniz_oxide" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1608,33 +1561,6 @@ dependencies = [ ] [[package]] -name = "nettle" -version = "7.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fdccf3eae7b161910d2daa2f0155ca35041322e8fe5c5f1f2c9d0b12356336" -dependencies = [ - "getrandom", - "libc", - "nettle-sys", - "thiserror", - "typenum", -] - -[[package]] -name = "nettle-sys" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b495053a10a19a80e3a26bf1212e92e29350797b5f5bdc58268c3f3f818e66ec" -dependencies = [ - "bindgen", - "cc", - "libc", - "pkg-config", - "tempfile", - "vcpkg", -] - -[[package]] name = "new_debug_unreachable" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1662,16 +1588,6 @@ dependencies = [ ] [[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] name = "normpath" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1753,6 +1669,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] +name = "openssl" +version = "0.10.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "openssl-sys" +version = "0.9.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1811,12 +1765,6 @@ dependencies = [ ] [[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] name = "percent-encoding" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2419,12 +2367,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2509,8 +2451,9 @@ dependencies = [ "lazy_static", "libc", "memsec", - "nettle", "once_cell", + "openssl", + "openssl-sys", "rand 0.8.5", "regex", "regex-syntax 0.8.2", @@ -2590,12 +2533,6 @@ dependencies = [ ] [[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - -[[package]] name = "signal-hook-registry" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -19,7 +19,7 @@ anyhow = "1" rocket = { version = "0.5", features = [ "json" ] } rocket_dyn_templates = { version = "0.1", features = ["handlebars"] } rocket_codegen = "0.5" -sequoia-openpgp = { version = "1", default-features = false, features = ["crypto-nettle"] } +sequoia-openpgp = { version = "1", default-features = false, features = ["crypto-openssl"] } multipart = "0" serde = "1" serde_derive = "1" @@ -37,7 +37,7 @@ Additionally, some external dependencies are required. Get them (on Debian or Ubuntu) with ```bash -sudo apt install gnutls-bin nettle-dev gcc llvm-dev libclang-dev build-essential pkg-config gettext +sudo apt install gnutls-bin libssl-dev gcc llvm-dev libclang-dev build-essential pkg-config gettext ``` After Rust and the other dependencies are installed, copy the config file, then simply compile and run: diff --git a/database/Cargo.toml b/database/Cargo.toml index 59c2f55..1381bab 100644 --- a/database/Cargo.toml +++ b/database/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Kai Michaelis <kai@sequoia-pgp.org>"] [dependencies] anyhow = "1" -sequoia-openpgp = { version = "1", default-features = false, features = ["crypto-nettle"] } +sequoia-openpgp = { version = "1", default-features = false, features = ["crypto-openssl"] } log = "0" rand = "0.6" serde = { version = "1.0", features = ["derive"] } diff --git a/docker-build/Dockerfile b/docker-build/Dockerfile index 536545c..2d8b6a2 100644 --- a/docker-build/Dockerfile +++ b/docker-build/Dockerfile @@ -1,6 +1,6 @@ FROM rustlang/rust:nightly RUN apt update -qy -RUN apt install -qy libclang-dev build-essential pkg-config clang nettle-dev gettext zsh +RUN apt install -qy libclang-dev build-essential pkg-config clang libssl-dev gettext zsh RUN useradd -u 1000 -d /home/user user && mkdir /home/user && chown user:user /home/user USER user diff --git a/hagridctl/Cargo.toml b/hagridctl/Cargo.toml index 35ca6db..b4bdcbe 100644 --- a/hagridctl/Cargo.toml +++ b/hagridctl/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Vincent Breitmoser <look@my.amazin.horse>"] [dependencies] hagrid-database = { path = "../database" } anyhow = "1" -sequoia-openpgp = { version = "1", default-features = false, features = ["crypto-nettle"] } +sequoia-openpgp = { version = "1", default-features = false, features = ["crypto-openssl"] } multipart = "0" log = "0" rand = "0.6" @@ -20,7 +20,6 @@ pkgs.mkShell { openssl clang - nettle pkg-config gettext |