From ab688c206b75b5cfe4deef30df1d153e4c4568ca Mon Sep 17 00:00:00 2001 From: jschaul Date: Wed, 27 Apr 2022 17:52:21 +0200 Subject: [PATCH 01/13] update deps --- libs/libzauth/libzauth-c/Cargo.lock | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/libs/libzauth/libzauth-c/Cargo.lock b/libs/libzauth/libzauth-c/Cargo.lock index c5d68fd722..20fb8d0ee7 100644 --- a/libs/libzauth/libzauth-c/Cargo.lock +++ b/libs/libzauth/libzauth-c/Cargo.lock @@ -1,71 +1,71 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "asexp" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e368761ce758947307f1c2db1f46077b1aabb5af7f268b6cededd1b52802652" [[package]] name = "libc" -version = "0.2.42" +version = "0.2.124" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" [[package]] name = "libsodium-sys" version = "0.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbd1beeed8d44caa8a669ebaa697c313976e242c03cc9fb23d88bf1656f5542" dependencies = [ - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "pkg-config", ] [[package]] name = "pkg-config" -version = "0.3.11" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" [[package]] name = "serde" -version = "1.0.66" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" [[package]] name = "sodiumoxide" version = "0.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5cb2f14f9a51352ad65e59257a0a9459d5a36a3615f3d53a974c82fdaaa00a" dependencies = [ - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "libsodium-sys 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "libsodium-sys", + "serde", ] [[package]] name = "zauth" version = "3.0.0" dependencies = [ - "asexp 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "sodiumoxide 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "asexp", + "rustc-serialize", + "sodiumoxide", ] [[package]] name = "zauth-c" version = "3.0.0" dependencies = [ - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "zauth 3.0.0", + "libc", + "zauth", ] - -[metadata] -"checksum asexp 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7732afa1e74fd81158a4614ee47a6b5d61cf3919296367c2dc3657d78a0c831b" -"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1" -"checksum libsodium-sys 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcbd1beeed8d44caa8a669ebaa697c313976e242c03cc9fb23d88bf1656f5542" -"checksum pkg-config 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "110d5ee3593dbb73f56294327fe5668bcc997897097cbc76b51e7aed3f52452f" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)" = "e9a2d9a9ac5120e0f768801ca2b58ad6eec929dc9d1d616c162f208869c2ce95" -"checksum sodiumoxide 0.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb5cb2f14f9a51352ad65e59257a0a9459d5a36a3615f3d53a974c82fdaaa00a" From bd82723e17d504372c51b01bde1797db276f1cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Dimja=C5=A1evi=C4=87?= Date: Thu, 28 Apr 2022 10:11:34 +0200 Subject: [PATCH 02/13] Use sodiumoxide 0.2.7 - The result of running `cargo update` in the libzauth and libzauth-c folders is reflected in Cargo.lock files. One of the two lock files wasn't tracked by Git so this commit adds it. --- libs/libzauth/libzauth-c/Cargo.lock | 83 +++++++++- libs/libzauth/libzauth/Cargo.lock | 238 ++++++++++++++++++++++++++++ libs/libzauth/libzauth/Cargo.toml | 2 +- 3 files changed, 318 insertions(+), 5 deletions(-) create mode 100644 libs/libzauth/libzauth/Cargo.lock diff --git a/libs/libzauth/libzauth-c/Cargo.lock b/libs/libzauth/libzauth-c/Cargo.lock index 20fb8d0ee7..82a7604c36 100644 --- a/libs/libzauth/libzauth-c/Cargo.lock +++ b/libs/libzauth/libzauth-c/Cargo.lock @@ -8,6 +8,21 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e368761ce758947307f1c2db1f46077b1aabb5af7f268b6cededd1b52802652" +[[package]] +name = "cc" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" + +[[package]] +name = "ed25519" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4" +dependencies = [ + "signature", +] + [[package]] name = "libc" version = "0.2.124" @@ -16,12 +31,14 @@ checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" [[package]] name = "libsodium-sys" -version = "0.0.16" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbd1beeed8d44caa8a669ebaa697c313976e242c03cc9fb23d88bf1656f5542" +checksum = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd" dependencies = [ + "cc", "libc", "pkg-config", + "walkdir", ] [[package]] @@ -36,23 +53,81 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "serde" version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +[[package]] +name = "signature" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" + [[package]] name = "sodiumoxide" -version = "0.0.16" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5cb2f14f9a51352ad65e59257a0a9459d5a36a3615f3d53a974c82fdaaa00a" +checksum = "e26be3acb6c2d9a7aac28482586a7856436af4cfe7100031d219de2d2ecb0028" dependencies = [ + "ed25519", "libc", "libsodium-sys", "serde", ] +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "zauth" version = "3.0.0" diff --git a/libs/libzauth/libzauth/Cargo.lock b/libs/libzauth/libzauth/Cargo.lock new file mode 100644 index 0000000000..8f63f15ff8 --- /dev/null +++ b/libs/libzauth/libzauth/Cargo.lock @@ -0,0 +1,238 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "asexp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e368761ce758947307f1c2db1f46077b1aabb5af7f268b6cededd1b52802652" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "cc" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" + +[[package]] +name = "clap" +version = "3.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c167e37342afc5f33fd87bbc870cedd020d2a6dffa05d45ccd9241fbdd146db" +dependencies = [ + "atty", + "bitflags", + "clap_lex", + "indexmap", + "strsim", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_lex" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "189ddd3b5d32a70b35e7686054371742a937b0d99128e76dde6340210e966669" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "ed25519" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4" +dependencies = [ + "signature", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "indexmap" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "libc" +version = "0.2.124" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" + +[[package]] +name = "libsodium-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd" +dependencies = [ + "cc", + "libc", + "pkg-config", + "walkdir", +] + +[[package]] +name = "os_str_bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" + +[[package]] +name = "pkg-config" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" + +[[package]] +name = "rustc-serialize" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "serde" +version = "1.0.136" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" + +[[package]] +name = "signature" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" + +[[package]] +name = "sodiumoxide" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e26be3acb6c2d9a7aac28482586a7856436af4cfe7100031d219de2d2ecb0028" +dependencies = [ + "ed25519", + "libc", + "libsodium-sys", + "serde", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "zauth" +version = "3.0.0" +dependencies = [ + "asexp", + "clap", + "rustc-serialize", + "sodiumoxide", +] diff --git a/libs/libzauth/libzauth/Cargo.toml b/libs/libzauth/libzauth/Cargo.toml index 02e44389c1..05256270f0 100644 --- a/libs/libzauth/libzauth/Cargo.toml +++ b/libs/libzauth/libzauth/Cargo.toml @@ -10,7 +10,7 @@ name = "zauth" [dependencies] asexp = ">= 0.3" rustc-serialize = ">= 0.3" -sodiumoxide = "= 0.0.16" +sodiumoxide = "= 0.2.7" [dev-dependencies] clap = ">= 2.0" From 3dd32ba0e6357c589dbd019e06ef2f890b2a1943 Mon Sep 17 00:00:00 2001 From: jschaul Date: Thu, 28 Apr 2022 14:21:25 +0200 Subject: [PATCH 03/13] fix some rust warnings; hopefully --- libs/libzauth/libzauth-c/src/lib.rs | 17 +++++++---------- libs/libzauth/libzauth/src/acl.rs | 6 +++--- libs/libzauth/libzauth/src/error.rs | 2 +- libs/libzauth/libzauth/src/zauth.rs | 14 +++++++------- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/libs/libzauth/libzauth-c/src/lib.rs b/libs/libzauth/libzauth-c/src/lib.rs index a2d3d73785..de419b7f77 100644 --- a/libs/libzauth/libzauth-c/src/lib.rs +++ b/libs/libzauth/libzauth-c/src/lib.rs @@ -18,7 +18,7 @@ extern crate libc; extern crate zauth; -use libc::{size_t, uint8_t}; +use libc::size_t; use std::char; use std::fs::File; use std::io::{self, BufReader, Read}; @@ -41,7 +41,6 @@ macro_rules! try_unwrap { } #[repr(C)] -#[no_mangle] #[derive(Clone, Copy, Debug)] pub struct Range { ptr: *const u8, @@ -53,7 +52,7 @@ pub struct ZauthKeystore(zauth::Keystore); pub struct ZauthToken(zauth::Token<'static>); #[no_mangle] -pub extern fn zauth_keystore_open(f: *const uint8_t, n: size_t, s: *mut *mut ZauthKeystore) -> ZauthResult { +pub extern fn zauth_keystore_open(f: *const u8, n: size_t, s: *mut *mut ZauthKeystore) -> ZauthResult { if f.is_null() { return ZauthResult::NullArg; } @@ -77,7 +76,7 @@ pub extern fn zauth_keystore_delete(s: *mut ZauthKeystore) { } #[no_mangle] -pub extern fn zauth_acl_open(f: *const uint8_t, n: size_t, a: *mut *mut ZauthAcl) -> ZauthResult { +pub extern fn zauth_acl_open(f: *const u8, n: size_t, a: *mut *mut ZauthAcl) -> ZauthResult { if f.is_null() { return ZauthResult::NullArg; } @@ -104,7 +103,7 @@ pub extern fn zauth_acl_delete(a: *mut ZauthAcl) { } #[no_mangle] -pub extern fn zauth_token_parse(cs: *const uint8_t, n: size_t, zt: *mut *mut ZauthToken) -> ZauthResult { +pub extern fn zauth_token_parse(cs: *const u8, n: size_t, zt: *mut *mut ZauthToken) -> ZauthResult { if cs.is_null() { return ZauthResult::NullArg; } @@ -129,7 +128,7 @@ pub extern fn zauth_token_verify(t: &ZauthToken, s: &ZauthKeystore) -> ZauthResu #[no_mangle] pub extern -fn zauth_token_allowed(t: &ZauthToken, acl: &ZauthAcl, cp: *const uint8_t, n: size_t, out: *mut uint8_t) -> ZauthResult { +fn zauth_token_allowed(t: &ZauthToken, acl: &ZauthAcl, cp: *const u8, n: size_t, out: *mut u8) -> ZauthResult { catch_unwind(|| { let b = unsafe { slice::from_raw_parts(cp, n) }; let s = try_unwrap!(str::from_utf8(b)); @@ -154,12 +153,12 @@ pub extern fn zauth_token_type(t: &ZauthToken) -> ZauthTokenType { //} #[no_mangle] -pub extern fn zauth_token_version(t: &ZauthToken) -> uint8_t { +pub extern fn zauth_token_version(t: &ZauthToken) -> u8 { t.0.version } #[no_mangle] -pub extern fn zauth_token_lookup(t: &ZauthToken, c: uint8_t) -> Range { +pub extern fn zauth_token_lookup(t: &ZauthToken, c: u8) -> Range { if let Some(k) = char::from_u32(c as u32) { if let Some(s) = t.0.lookup(k) { return Range { ptr: s.as_ptr(), len: s.len() } @@ -177,7 +176,6 @@ pub extern fn zauth_token_delete(t: *mut ZauthToken) { } #[repr(C)] -#[no_mangle] #[derive(Clone, Copy, Debug)] pub enum ZauthTokenType { User = 0, @@ -204,7 +202,6 @@ impl From for ZauthTokenType { } #[repr(C)] -#[no_mangle] #[derive(Clone, Copy, Debug)] pub enum ZauthResult { Ok = 0, diff --git a/libs/libzauth/libzauth/src/acl.rs b/libs/libzauth/libzauth/src/acl.rs index 36bfbb724b..a14ab697f5 100644 --- a/libs/libzauth/libzauth/src/acl.rs +++ b/libs/libzauth/libzauth/src/acl.rs @@ -49,12 +49,12 @@ impl Acl { let mut acl = HashMap::new(); for &(ref key, ref list) in entries { if let Some(k) = key.get_str().map(String::from) { - acl.insert(k, try!(List::from_sexp(&list))); + acl.insert(k, List::from_sexp(&list)?); } else { return Err(Error::Parse("not a string")) } } - Ok(Acl { acl: acl }) + Ok(Acl { acl }) } _ => Err(Error::Parse("expected key and values")) } @@ -104,7 +104,7 @@ impl List { _ => { let mut t = Tree::new(); for x in xs { - t.add(&try!(List::read_path(x))) + t.add(&List::read_path(x)?) } Ok(Some(t)) } diff --git a/libs/libzauth/libzauth/src/error.rs b/libs/libzauth/libzauth/src/error.rs index be06eecae8..22b471d60e 100644 --- a/libs/libzauth/libzauth/src/error.rs +++ b/libs/libzauth/libzauth/src/error.rs @@ -52,7 +52,7 @@ impl error::Error for Error { "zauth error" } - fn cause(&self) -> Option<&error::Error> { + fn cause(&self) -> Option<&dyn error::Error> { match *self { Error::Io(ref e) => Some(e), _ => None diff --git a/libs/libzauth/libzauth/src/zauth.rs b/libs/libzauth/libzauth/src/zauth.rs index ffa184001a..ecb45c6399 100644 --- a/libs/libzauth/libzauth/src/zauth.rs +++ b/libs/libzauth/libzauth/src/zauth.rs @@ -36,10 +36,10 @@ impl Keystore { } pub fn open(p: &Path) -> Result { - let reader = BufReader::new(try!(File::open(p))); + let reader = BufReader::new(File::open(p)?); let mut keys = Vec::new(); for line in reader.lines() { - let decoded = try!(try!(line).from_base64()); + let decoded = line?.from_base64()?; match PublicKey::from_slice(&decoded) { None => return Err(Error::Invalid("public key")), Some(k) => keys.push(k) @@ -122,9 +122,9 @@ impl<'r> Token<'r> { }; let signature = - match Signature::from_slice(&try!(sgn.from_base64())) { - Some(s) => s, - None => return Err(Error::Invalid("signature")) + match Signature::from_bytes(&sgn.from_base64()?) { + Ok(s) => s, + Err(_) => return Err(Error::Invalid("signature")) }; let mut meta = HashMap::new(); @@ -140,14 +140,14 @@ impl<'r> Token<'r> { } Ok(Token { - signature: signature, + signature, version: to_field!(meta.remove(&'v'), "version"), key_idx: to_field!(meta.remove(&'k'), "key index"), timestamp: to_field!(meta.remove(&'d'), "timestamp"), token_type: to_field!(meta.remove(&'t'), "type"), token_tag: meta.remove(&'l') .and_then(|t| if t == "" { None } else { Some(t) }), - meta: meta, + meta, data: data[1..].as_bytes() }) } From 1081ab918e7be41d0530c2e708082e81260a31e7 Mon Sep 17 00:00:00 2001 From: jschaul Date: Thu, 28 Apr 2022 14:29:09 +0200 Subject: [PATCH 04/13] fix more errors and warnings --- libs/libzauth/libzauth/examples/verify.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/libzauth/libzauth/examples/verify.rs b/libs/libzauth/libzauth/examples/verify.rs index 70619b410c..a15691e201 100644 --- a/libs/libzauth/libzauth/examples/verify.rs +++ b/libs/libzauth/libzauth/examples/verify.rs @@ -18,24 +18,24 @@ extern crate clap; extern crate zauth; -use clap::{Arg, App}; +use clap::{Arg, Command}; use std::path::Path; use std::process; use zauth::{Token, Keystore}; pub fn main() { - let args = App::new("verify") + let args = Command::new("verify") .about("Test application verifying tokens") - .arg(Arg::with_name("store") + .arg(Arg::new("store") .required(true) - .short("s") + .short('s') .long("store") .value_name("FILE") .help("Keystore") .takes_value(true)) - .arg(Arg::with_name("token") + .arg(Arg::new("token") .required(true) - .short("t") + .short('t') .long("token") .value_name("STRING") .help("Token string to verify") From 0d7db5bc36141472526a3011ed71332a0d2cee77 Mon Sep 17 00:00:00 2001 From: jschaul Date: Thu, 28 Apr 2022 14:34:54 +0200 Subject: [PATCH 05/13] fix compilation errors in tests, too --- libs/libzauth/libzauth/src/zauth.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/libzauth/libzauth/src/zauth.rs b/libs/libzauth/libzauth/src/zauth.rs index ecb45c6399..a95fcba2b7 100644 --- a/libs/libzauth/libzauth/src/zauth.rs +++ b/libs/libzauth/libzauth/src/zauth.rs @@ -235,7 +235,7 @@ mod tests { #[test] fn parse_access() { let t = Token::parse(ACCESS_TOKEN).unwrap(); - assert_eq!(t.signature.0[..], "aEPOxMwUriGEv2qc7Pb672ygy-6VeJ-8VrX3jmwalZr7xygU4izyCWxiT7IXfybnNGIsk1FQPb0RRVPx1s2UCw==".from_base64().unwrap()[..]); + assert_eq!(t.signature.to_bytes(), "aEPOxMwUriGEv2qc7Pb672ygy-6VeJ-8VrX3jmwalZr7xygU4izyCWxiT7IXfybnNGIsk1FQPb0RRVPx1s2UCw==".from_base64().unwrap()[..]); assert_eq!(t.version, 1); assert_eq!(t.key_idx, 1); assert_eq!(t.timestamp, 1466770783); @@ -248,7 +248,7 @@ mod tests { #[test] fn parse_user() { let t = Token::parse(USER_TOKEN).unwrap(); - assert_eq!(t.signature.0[..], "vpJs7PEgwtsuzGlMY0-Vqs22s8o9ZDlp7wJrPmhCgIfg0NoTAxvxq5OtknabLMfNTEW9amn5tyeUM7tbFZABBA==".from_base64().unwrap()[..]); + assert_eq!(t.signature.to_bytes(), "vpJs7PEgwtsuzGlMY0-Vqs22s8o9ZDlp7wJrPmhCgIfg0NoTAxvxq5OtknabLMfNTEW9amn5tyeUM7tbFZABBA==".from_base64().unwrap()[..]); assert_eq!(t.version, 1); assert_eq!(t.key_idx, 1); assert_eq!(t.timestamp, 1466770905); @@ -261,7 +261,7 @@ mod tests { #[test] fn parse_bot() { let t = Token::parse(BOT_TOKEN).unwrap(); - assert_eq!(t.signature.0[..], "-cEsTNb68hb-By81MZd5fF6NMDVzR_emkV_HfOnIdZTXsoeRRRZA7hmv9y2uLUNWDifNd-B8u0AjiAT_2rzUDg==".from_base64().unwrap()[..]); + assert_eq!(t.signature.to_bytes(), "-cEsTNb68hb-By81MZd5fF6NMDVzR_emkV_HfOnIdZTXsoeRRRZA7hmv9y2uLUNWDifNd-B8u0AjiAT_2rzUDg==".from_base64().unwrap()[..]); assert_eq!(t.version, 1); assert_eq!(t.key_idx, 1); assert_eq!(t.timestamp, -1); @@ -275,7 +275,7 @@ mod tests { #[test] fn parse_session() { let t = Token::parse(SESSION_TOKEN).unwrap(); - assert_eq!(t.signature.0[..], "hmTE4dWsW3TuOXtvAuSuHMcEHxT4MCqGrJ2hCw0YLZ1_XnjSc3ByohekeSrz7zjmEzHM-QSkg8MbrawR-kcjBQ==".from_base64().unwrap()[..]); + assert_eq!(t.signature.to_bytes(), "hmTE4dWsW3TuOXtvAuSuHMcEHxT4MCqGrJ2hCw0YLZ1_XnjSc3ByohekeSrz7zjmEzHM-QSkg8MbrawR-kcjBQ==".from_base64().unwrap()[..]); assert_eq!(t.version, 1); assert_eq!(t.key_idx, 1); assert_eq!(t.timestamp, 1466771315); @@ -288,7 +288,7 @@ mod tests { #[test] fn parse_provider() { let t = Token::parse(PROVIDER_TOKEN).unwrap(); - assert_eq!(t.signature.0[..], "qcJ9zxFHMaiqj-tauhywI435BBs8t6wFyXAShkSQqaHK9r36k012rJYJIE7TTCHlFaGOzsk6E7h5G8JkLVjFDg==".from_base64().unwrap()[..]); + assert_eq!(t.signature.to_bytes(), "qcJ9zxFHMaiqj-tauhywI435BBs8t6wFyXAShkSQqaHK9r36k012rJYJIE7TTCHlFaGOzsk6E7h5G8JkLVjFDg==".from_base64().unwrap()[..]); assert_eq!(t.version, 1); assert_eq!(t.key_idx, 1); assert_eq!(t.timestamp, 1467640768); @@ -300,7 +300,7 @@ mod tests { #[test] fn parse_legal_hold_access() { let t = Token::parse(LEGAL_HOLD_ACCESS_TOKEN).unwrap(); - assert_eq!(t.signature.0[..], "6wca6kIO7_SFAev_Pl2uS6cBdkKuGk6MIh8WBK_ivZnwtRVrXF2pEHiocUWQZDy8YTrEweTJrqxUDptA7M1SBA==".from_base64().unwrap()[..]); + assert_eq!(t.signature.to_bytes(), "6wca6kIO7_SFAev_Pl2uS6cBdkKuGk6MIh8WBK_ivZnwtRVrXF2pEHiocUWQZDy8YTrEweTJrqxUDptA7M1SBA==".from_base64().unwrap()[..]); assert_eq!(t.version, 1); assert_eq!(t.key_idx, 1); assert_eq!(t.timestamp, 1558361639); @@ -313,7 +313,7 @@ mod tests { #[test] fn parse_legal_hold_user() { let t = Token::parse(LEGAL_HOLD_USER_TOKEN).unwrap(); - assert_eq!(t.signature.0[..], "GsydW1LQvwGYBGFErvqcqJvcipumtcdfVL4Li83KwR1ucnm-IrPM40SKl9Rhsdv0sqF_MF_eyTqMe_XpXR81Cg==".from_base64().unwrap()[..]); + assert_eq!(t.signature.to_bytes(), "GsydW1LQvwGYBGFErvqcqJvcipumtcdfVL4Li83KwR1ucnm-IrPM40SKl9Rhsdv0sqF_MF_eyTqMe_XpXR81Cg==".from_base64().unwrap()[..]); assert_eq!(t.version, 1); assert_eq!(t.key_idx, 1); assert_eq!(t.timestamp, 1558361914); From adc2f352e1f193818f2dc7ea9587687bb9a9c5bb Mon Sep 17 00:00:00 2001 From: jschaul Date: Thu, 28 Apr 2022 20:00:39 +0200 Subject: [PATCH 06/13] Hi CI From 3596af7e7962fdffcfdba121835c055ba51e32d3 Mon Sep 17 00:00:00 2001 From: jschaul Date: Mon, 2 May 2022 12:47:55 +0200 Subject: [PATCH 07/13] Update libs/libzauth/libzauth/Cargo.toml Co-authored-by: Sebastian Willenborg --- libs/libzauth/libzauth/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libzauth/libzauth/Cargo.toml b/libs/libzauth/libzauth/Cargo.toml index 05256270f0..bcff7126d8 100644 --- a/libs/libzauth/libzauth/Cargo.toml +++ b/libs/libzauth/libzauth/Cargo.toml @@ -10,7 +10,7 @@ name = "zauth" [dependencies] asexp = ">= 0.3" rustc-serialize = ">= 0.3" -sodiumoxide = "= 0.2.7" +sodiumoxide = "^0.2.7" [dev-dependencies] clap = ">= 2.0" From e05ecb9ccb7ed5a8e96e536c7b8ef77d58c781f8 Mon Sep 17 00:00:00 2001 From: jschaul Date: Mon, 2 May 2022 12:48:23 +0200 Subject: [PATCH 08/13] remove unnecessary lock file --- libs/libzauth/libzauth/Cargo.lock | 238 ------------------------------ 1 file changed, 238 deletions(-) delete mode 100644 libs/libzauth/libzauth/Cargo.lock diff --git a/libs/libzauth/libzauth/Cargo.lock b/libs/libzauth/libzauth/Cargo.lock deleted file mode 100644 index 8f63f15ff8..0000000000 --- a/libs/libzauth/libzauth/Cargo.lock +++ /dev/null @@ -1,238 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "asexp" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e368761ce758947307f1c2db1f46077b1aabb5af7f268b6cededd1b52802652" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - -[[package]] -name = "clap" -version = "3.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c167e37342afc5f33fd87bbc870cedd020d2a6dffa05d45ccd9241fbdd146db" -dependencies = [ - "atty", - "bitflags", - "clap_lex", - "indexmap", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_lex" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "189ddd3b5d32a70b35e7686054371742a937b0d99128e76dde6340210e966669" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "ed25519" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4" -dependencies = [ - "signature", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "indexmap" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "libc" -version = "0.2.124" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" - -[[package]] -name = "libsodium-sys" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd" -dependencies = [ - "cc", - "libc", - "pkg-config", - "walkdir", -] - -[[package]] -name = "os_str_bytes" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" - -[[package]] -name = "pkg-config" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "serde" -version = "1.0.136" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" - -[[package]] -name = "signature" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" - -[[package]] -name = "sodiumoxide" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26be3acb6c2d9a7aac28482586a7856436af4cfe7100031d219de2d2ecb0028" -dependencies = [ - "ed25519", - "libc", - "libsodium-sys", - "serde", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" - -[[package]] -name = "walkdir" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" -dependencies = [ - "same-file", - "winapi", - "winapi-util", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "zauth" -version = "3.0.0" -dependencies = [ - "asexp", - "clap", - "rustc-serialize", - "sodiumoxide", -] From 6ac6ec0b484b4bb39f478252fc20b0a7186c577b Mon Sep 17 00:00:00 2001 From: jschaul Date: Mon, 2 May 2022 12:56:26 +0200 Subject: [PATCH 09/13] libzauth: run tests before creating release --- libs/libzauth/libzauth-c/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/libzauth/libzauth-c/Makefile b/libs/libzauth/libzauth-c/Makefile index d75be64011..af7965555e 100644 --- a/libs/libzauth/libzauth-c/Makefile +++ b/libs/libzauth/libzauth-c/Makefile @@ -43,7 +43,11 @@ uninstall: rm -f $(PREFIX_INSTALL)/lib/libzauth.$(LIB_TYPE) rm -f $(PREFIX_INSTALL)/lib/pkgconfig/libzauth.pc -dist: build-release +.PHONY: test +test: + cd ../libzauth && cargo test + +dist: test build-release mkdir -p deb$(PREFIX_PACKAGE)/include mkdir -p deb$(PREFIX_PACKAGE)/lib/pkgconfig cp src/zauth.h deb$(PREFIX_PACKAGE)/include/ From 95d5aa56c6d9361483efd0ae415fdec600c1cead Mon Sep 17 00:00:00 2001 From: jschaul Date: Mon, 2 May 2022 12:59:20 +0200 Subject: [PATCH 10/13] ... --- libs/libzauth/libzauth/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 libs/libzauth/libzauth/.gitignore diff --git a/libs/libzauth/libzauth/.gitignore b/libs/libzauth/libzauth/.gitignore new file mode 100644 index 0000000000..fb58b863d5 --- /dev/null +++ b/libs/libzauth/libzauth/.gitignore @@ -0,0 +1,3 @@ +# this file is not required to track in git as it is a library here and lock files are only used for binaries +# we track the lock file in libzauth-c. +Cargo.lock From 2000b3c19494e39251bdac51da8a946b23ef1bda Mon Sep 17 00:00:00 2001 From: jschaul Date: Mon, 2 May 2022 13:01:29 +0200 Subject: [PATCH 11/13] one more version bump --- libs/libzauth/libzauth-c/Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/libzauth/libzauth-c/Cargo.lock b/libs/libzauth/libzauth-c/Cargo.lock index 82a7604c36..71636e381b 100644 --- a/libs/libzauth/libzauth-c/Cargo.lock +++ b/libs/libzauth/libzauth-c/Cargo.lock @@ -25,9 +25,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.124" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" +checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" [[package]] name = "libsodium-sys" @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.136" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" [[package]] name = "signature" From ec8a4381cdbd440e3ec4ea15740b4a1c0a34725b Mon Sep 17 00:00:00 2001 From: jschaul Date: Mon, 2 May 2022 13:13:51 +0200 Subject: [PATCH 12/13] changelog entry --- changelog.d/5-internal/libzauth-dependency-upgrades | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5-internal/libzauth-dependency-upgrades diff --git a/changelog.d/5-internal/libzauth-dependency-upgrades b/changelog.d/5-internal/libzauth-dependency-upgrades new file mode 100644 index 0000000000..7f39c97736 --- /dev/null +++ b/changelog.d/5-internal/libzauth-dependency-upgrades @@ -0,0 +1 @@ +Upgrade version of libzauth dependencies, notably sodiumoxide bindings to libsodium, and fix resulting errors and warnings. From 2d4f9c5f1df353292add7c3ff22fcc9051453e0c Mon Sep 17 00:00:00 2001 From: jschaul Date: Tue, 3 May 2022 11:25:23 +0200 Subject: [PATCH 13/13] run tests in --release --- libs/libzauth/libzauth-c/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libzauth/libzauth-c/Makefile b/libs/libzauth/libzauth-c/Makefile index af7965555e..705d51b7f9 100644 --- a/libs/libzauth/libzauth-c/Makefile +++ b/libs/libzauth/libzauth-c/Makefile @@ -45,7 +45,7 @@ uninstall: .PHONY: test test: - cd ../libzauth && cargo test + cd ../libzauth && cargo test --release dist: test build-release mkdir -p deb$(PREFIX_PACKAGE)/include