From 8c8b2206df5647ce8d9baa5252bb5c8453b405ae Mon Sep 17 00:00:00 2001 From: Ionut Mihalcea Date: Wed, 13 Sep 2023 16:43:44 +0100 Subject: [PATCH] Bump MSRV and fix clippy lints Bumping MSRV to 1.60.0 as required for the picky-asn1 crate. Also setting the MSRV for clippy and fixing some of the remaining warnings. Some of the things clippy complains about for newer versions of the compiler can be fixed/changed without losing support for older compiler versions, but some features are incompatible. Since clippy is now configured to understand the MSRV, there's also no need for some of the `allow` attributes. Signed-off-by: Ionut Mihalcea --- .clippy.toml | 1 + .github/workflows/ci.yml | 2 +- tss-esapi-sys/build.rs | 1 - tss-esapi/Cargo.toml | 4 +- tss-esapi/src/tcti_ldr.rs | 1 - tss-esapi/tests/Cargo.lock.frozen | 793 ++++++++++++++++++ tss-esapi/tests/all-ubuntu.sh | 3 + .../abstraction_tests/pcr_tests.rs | 2 +- tss-esapi/tests/integration_tests/main.rs | 1 - .../algorithm_property_list_tests.rs | 4 +- .../lists_tests/command_code_list_tests.rs | 4 +- 11 files changed, 805 insertions(+), 11 deletions(-) create mode 100644 .clippy.toml create mode 100644 tss-esapi/tests/Cargo.lock.frozen diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 00000000..59d02545 --- /dev/null +++ b/.clippy.toml @@ -0,0 +1 @@ +msrv = "1.60.0" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afbe61f9..c996013e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Build the container run: docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu - name: Run the container - run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.57.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh + run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.60.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh # All in one job as I think it is a big overhead to build and run the Docker # container? tests-ubuntu: diff --git a/tss-esapi-sys/build.rs b/tss-esapi-sys/build.rs index 25530d27..1ab75d82 100644 --- a/tss-esapi-sys/build.rs +++ b/tss-esapi-sys/build.rs @@ -57,7 +57,6 @@ fn main() { } } -#[allow(clippy::uninlined_format_args)] #[cfg(feature = "generate-bindings")] pub fn generate_from_system(esapi_out: PathBuf) { pkg_config::Config::new() diff --git a/tss-esapi/Cargo.toml b/tss-esapi/Cargo.toml index 6c3c7ecf..427c2437 100644 --- a/tss-esapi/Cargo.toml +++ b/tss-esapi/Cargo.toml @@ -24,8 +24,8 @@ regex = "1.3.9" zeroize = { version = "1.1.0", features = ["zeroize_derive"] } tss-esapi-sys = { path = "../tss-esapi-sys", version = "0.4.0" } oid = "0.2.1" -picky-asn1 = "0.7.2" -picky-asn1-x509 = "0.11.0" +picky-asn1 = "0.5.0" +picky-asn1-x509 = "0.7.1" [dev-dependencies] env_logger = "0.9.0" diff --git a/tss-esapi/src/tcti_ldr.rs b/tss-esapi/src/tcti_ldr.rs index 4ca2600b..5e62e719 100644 --- a/tss-esapi/src/tcti_ldr.rs +++ b/tss-esapi/src/tcti_ldr.rs @@ -166,7 +166,6 @@ impl TctiNameConf { } } -#[allow(clippy::uninlined_format_args)] impl TryFrom for CString { type Error = Error; diff --git a/tss-esapi/tests/Cargo.lock.frozen b/tss-esapi/tests/Cargo.lock.frozen new file mode 100644 index 00000000..46b6500b --- /dev/null +++ b/tss-esapi/tests/Cargo.lock.frozen @@ -0,0 +1,793 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "atty" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8352656fd42c30a0c3c89d26dea01e3b77c0ab2af18230835c15e2e13cd51859" +dependencies = [ + "libc", + "termion", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bindgen" +version = "0.63.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2 1.0.52", + "quote 1.0.26", + "regex", + "rustc-hash", + "shlex", + "syn 1.0.99", + "which", +] + +[[package]] +name = "bitfield" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719" + +[[package]] +name = "bitflags" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" + +[[package]] +name = "block-buffer" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +dependencies = [ + "generic-array", +] + +[[package]] +name = "byteorder" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" + +[[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 = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9da1484c6a890e374ca5086062d4847e0a2c1e5eba9afa5d48c09e8eb39b2519" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4600d695eb3f6ce1cd44e6e291adceb2cc3ab12f20a33777ecd0bf6eba34e06" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cb780dce4f9a8f5c087362b3a4595936b2019e7c8b30f2c3e9a7e94e6ae9837" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "either" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" + +[[package]] +name = "enumflags2" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +dependencies = [ + "enumflags2_derive", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "syn 2.0.12", +] + +[[package]] +name = "env_logger" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "hostname-validator" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14a194c8bc9f0ce9901de058cf114bab6ae85d461adc4bfa37deb295ad89d4" + +[[package]] +name = "humantime" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b6c53306532d3c8e8087b44e6580e10db51a023cf9b433cea2ac38066b92da" + +[[package]] +name = "lazy_static" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" + +[[package]] +name = "lazycell" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d33a48d0365c96081958cc663eef834975cb1e8d8bea3378513fc72bdbf11e50" + +[[package]] +name = "libc" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36" + +[[package]] +name = "libloading" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c979a19ffb457f0273965c333053f3d586bf759bf7b683fbebc37f9a9ebedc4" +dependencies = [ + "winapi", +] + +[[package]] +name = "log" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +dependencies = [ + "cfg-if 0.1.2", +] + +[[package]] +name = "maplit" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed95049d40b8a1a7691adbabca028ad481f7e6a2921ce4846e1ee168b4e4ca5" + +[[package]] +name = "mbox" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f88d5c34d63aad11aa4321ef55ccb064af58b3ad8091079ae22bf83e5eb75d6" +dependencies = [ + "libc", + "rustc_version", + "stable_deref_trait", +] + +[[package]] +name = "memchr" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" + +[[package]] +name = "minimal-lexical" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6595bb28ed34f43c3fe088e48f6cfb2e033cab45f25a5384d5fdf564fbc8c4b2" + +[[package]] +name = "nom" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffd9d26838a953b4af82cbeb9f1592c6798916983959be223a7124e992742c1" +dependencies = [ + "memchr", + "minimal-lexical", + "version_check", +] + +[[package]] +name = "num-derive" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f09b9841adb6b5e1f89ef7087ea636e0fd94b2851f887c1e3eb5d5f8228fab3" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "syn 1.0.99", +] + +[[package]] +name = "num-traits" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +dependencies = [ + "autocfg", +] + +[[package]] +name = "oid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c19903c598813dba001b53beeae59bb77ad4892c5c1b9b3500ce4293a0d06c2" +dependencies = [ + "serde", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pest" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cd9a1576dae6ec544a5c9627addf3295b34aebc2acecbba5fe610fc266c166" + +[[package]] +name = "pest" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4846c5c088c24c734f2910f4015a5ab675f4b9983a36808f47f19fa2d660c1fe" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3294f437119209b084c797604295f40227cffa35c57220b1e99a6ff3bf8ee4" +dependencies = [ + "pest 1.0.0", + "quote 0.3.15", + "syn 0.11.0", +] + +[[package]] +name = "pest_derive" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66c7181f1f6f549d2e298f4a23a10969fa01fc00e7496789888aaac6a7c71dcc" +dependencies = [ + "pest 2.0.0", + "pest_meta", + "proc-macro2 0.4.4", + "quote 0.6.3", + "syn 0.14.1", +] + +[[package]] +name = "pest_meta" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bef60828587193f18e75ee8e0b0fdf032091025757aecafb1d8789f70369a01" +dependencies = [ + "maplit", + "pest 1.0.0", + "pest_derive 1.0.8", +] + +[[package]] +name = "picky-asn1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1088a7f82ee21e534da0f62b074b559d2a0717b0d5104ba7a47c1f5bc6c83f69" +dependencies = [ + "oid", + "serde", + "serde_bytes", +] + +[[package]] +name = "picky-asn1-der" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac9e1454c26d52ef1951149e611ca2851673fea960269060887acc6793e3e683" +dependencies = [ + "picky-asn1", + "serde", + "serde_bytes", +] + +[[package]] +name = "picky-asn1-x509" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43aa17ded8046e4809d21f0a007439ebcd1aa23e88003a6d68ba9992b26c96f7" +dependencies = [ + "base64", + "oid", + "picky-asn1", + "picky-asn1-der", + "serde", +] + +[[package]] +name = "pkg-config" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" + +[[package]] +name = "proc-macro2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa93823f53cfd0f5ac117b189aed6cfdfb2cfc0a9d82e956dd7927595ed7d46" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" + +[[package]] +name = "quote" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035" +dependencies = [ + "proc-macro2 0.4.4", +] + +[[package]] +name = "quote" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +dependencies = [ + "proc-macro2 1.0.52", +] + +[[package]] +name = "redox_syscall" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" + +[[package]] +name = "redox_termios" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc495930de8d330f14856cface52561b7d79a072c76e438cf8f34d7233a35fa7" +dependencies = [ + "redox_syscall", +] + +[[package]] +name = "regex" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a250501c60d8ee37c3c8cd93d95344a4653ce4999136cc9b3eb4c98770a4aea3" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00efb87459ba4f6fb2169d20f68565555688e1250ee6825cdf6254f8b48fafb2" + +[[package]] +name = "rustc-hash" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" +dependencies = [ + "byteorder", +] + +[[package]] +name = "rustc_version" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c94201b44764d6d1f7e37c15a8289ed55e546c1762c7f1d57f616966e0c181" +dependencies = [ + "semver", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e012c6c5380fb91897ba7b9261a0f565e624e869d42fe1a1d03fa0d68a083d5" +dependencies = [ + "pest 2.0.0", + "pest_derive 2.0.0", +] + +[[package]] +name = "serde" +version = "1.0.136" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.136" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "syn 1.0.99", +] + +[[package]] +name = "sha2" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d" + +[[package]] +name = "stable_deref_trait" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" + +[[package]] +name = "syn" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e44e1ff7ab9eb88e7b110183942365b1b212198e29dea18f44665f3a3f8cf0f" +dependencies = [ + "quote 0.3.15", + "unicode-xid 0.0.3", +] + +[[package]] +name = "syn" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dfd71b2be5a58ee30a6f8ea355ba8290d397131c00dfa55c3d34e6e13db5101" +dependencies = [ + "proc-macro2 0.4.4", + "quote 0.6.3", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "575be94ccb86e8da37efb894a87e2b660be299b41d8ef347f9d6d79fbe61b1ba" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "syn 1.0.99", + "unicode-xid 0.2.0", +] + +[[package]] +name = "target-lexicon" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ae3b39281e4b14b8123bdbaddd472b7dfe215e444181f2f9d2443c2444f834" + +[[package]] +name = "termcolor" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3390f44f1f706d8870297b6a2c4f92d9ab65a37c265fbbc6ac4ee72bcc2f3698" +dependencies = [ + "wincolor", +] + +[[package]] +name = "termion" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8affd752d0f2c7127d6d5f1b98182a5471606b48b1a955165d39eb5e4887ceba" +dependencies = [ + "libc", + "redox_syscall", + "redox_termios", +] + +[[package]] +name = "tss-esapi" +version = "7.2.0" +dependencies = [ + "bitfield", + "enumflags2", + "env_logger", + "hostname-validator", + "log", + "mbox", + "num-derive", + "num-traits", + "oid", + "picky-asn1", + "picky-asn1-x509", + "regex", + "serde", + "sha2", + "tss-esapi-sys", + "zeroize", +] + +[[package]] +name = "tss-esapi-sys" +version = "0.4.0" +dependencies = [ + "bindgen", + "pkg-config", + "target-lexicon", +] + +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + +[[package]] +name = "ucd-trie" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71a9c5b1fe77426cf144cc30e49e955270f5086e31a6441dfa8b32efc09b9d77" + +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" + +[[package]] +name = "unicode-xid" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36dff09cafb4ec7c8cf0023eb0b686cb6ce65499116a12201c9e11840ca01beb" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" + +[[package]] +name = "version_check" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" + +[[package]] +name = "which" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" +dependencies = [ + "either", + "lazy_static", + "libc", +] + +[[package]] +name = "winapi" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3ad91d846a4a5342c1fb7008d26124ee6cf94a3953751618577295373b32117" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a16a8e2ebfc883e2b1771c6482b1fb3c6831eab289ba391619a2d93a7356220f" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca29cb03c8ceaf20f8224a18a530938305e9872b1478ea24ff44b4f503a1d1d" + +[[package]] +name = "wincolor" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9dc3aa9dcda98b5a16150c54619c1ead22e3d3a5d458778ae914be760aa981a" +dependencies = [ + "winapi", +] + +[[package]] +name = "zeroize" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "syn 1.0.99", + "synstructure", +] diff --git a/tss-esapi/tests/all-ubuntu.sh b/tss-esapi/tests/all-ubuntu.sh index 37a4716d..96e95fe2 100755 --- a/tss-esapi/tests/all-ubuntu.sh +++ b/tss-esapi/tests/all-ubuntu.sh @@ -15,6 +15,9 @@ set -euf -o pipefail ################################################# if [[ ! -z ${RUST_TOOLCHAIN_VERSION:+x} ]]; then rustup override set ${RUST_TOOLCHAIN_VERSION} + # Use the frozen Cargo lock to prevent any drift from MSRV being upgraded + # underneath our feet. + cp tests/Cargo.lock.frozen ../Cargo.lock fi ################################################# diff --git a/tss-esapi/tests/integration_tests/abstraction_tests/pcr_tests.rs b/tss-esapi/tests/integration_tests/abstraction_tests/pcr_tests.rs index 33aa7280..296eff3d 100644 --- a/tss-esapi/tests/integration_tests/abstraction_tests/pcr_tests.rs +++ b/tss-esapi/tests/integration_tests/abstraction_tests/pcr_tests.rs @@ -119,7 +119,7 @@ fn test_pcr_read_all() { ) .expect("Call 3 to pcr_read failed"); - vec![read_pcrs_1, read_pcrs_2, read_pcrs_3] + [read_pcrs_1, read_pcrs_2, read_pcrs_3] .iter() .enumerate() .for_each(|(idx, dl)| { diff --git a/tss-esapi/tests/integration_tests/main.rs b/tss-esapi/tests/integration_tests/main.rs index b9d63fbd..90e78604 100644 --- a/tss-esapi/tests/integration_tests/main.rs +++ b/tss-esapi/tests/integration_tests/main.rs @@ -1,6 +1,5 @@ // Copyright 2021 Contributors to the Parsec project. // SPDX-License-Identifier: Apache-2.0 -#![allow(clippy::uninlined_format_args)] #[path = "common/mod.rs"] mod common; diff --git a/tss-esapi/tests/integration_tests/structures_tests/lists_tests/algorithm_property_list_tests.rs b/tss-esapi/tests/integration_tests/structures_tests/lists_tests/algorithm_property_list_tests.rs index 0e0168a1..abe40280 100644 --- a/tss-esapi/tests/integration_tests/structures_tests/lists_tests/algorithm_property_list_tests.rs +++ b/tss-esapi/tests/integration_tests/structures_tests/lists_tests/algorithm_property_list_tests.rs @@ -13,7 +13,7 @@ use std::convert::{TryFrom, TryInto}; #[test] fn test_conversions() { - let expected_algorithm_properties = vec![ + let expected_algorithm_properties = [ (AlgorithmIdentifier::Rsa, AlgorithmAttributes(1)), (AlgorithmIdentifier::Aes, AlgorithmAttributes(2)), ]; @@ -61,7 +61,7 @@ fn test_conversions() { #[test] fn test_valid_conversion_vector() { - let expected_algorithm_properties = vec![ + let expected_algorithm_properties = [ (AlgorithmIdentifier::Rsa, AlgorithmAttributes(1)), (AlgorithmIdentifier::Aes, AlgorithmAttributes(2)), ]; diff --git a/tss-esapi/tests/integration_tests/structures_tests/lists_tests/command_code_list_tests.rs b/tss-esapi/tests/integration_tests/structures_tests/lists_tests/command_code_list_tests.rs index db99fd65..9474d85c 100644 --- a/tss-esapi/tests/integration_tests/structures_tests/lists_tests/command_code_list_tests.rs +++ b/tss-esapi/tests/integration_tests/structures_tests/lists_tests/command_code_list_tests.rs @@ -12,7 +12,7 @@ use std::convert::{TryFrom, TryInto}; #[test] fn test_conversions() { - let expected_command_codes = vec![ + let expected_command_codes = [ CommandCode::ChangeEps, CommandCode::ChangePps, CommandCode::Clear, @@ -83,7 +83,7 @@ fn test_conversions() { #[test] fn test_valid_conversion_vector() { - let expected_command_codes = vec![ + let expected_command_codes = [ CommandCode::ChangeEps, CommandCode::ChangePps, CommandCode::Clear,