From a78e6f9443a75a83d3bc6bb92ffcb8b004205c2d Mon Sep 17 00:00:00 2001 From: Nils Ponsard | Nitrokey Date: Wed, 30 Aug 2023 14:17:05 +0200 Subject: [PATCH] feat: remove unused default features --- Cargo.lock | 116 +++++++--------------------------------------- pkcs11/Cargo.toml | 32 ++++++++----- 2 files changed, 36 insertions(+), 112 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2b05d59..f9fd374a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,27 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aho-corasick" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" -dependencies = [ - "memchr", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "base64" version = "0.21.2" @@ -43,9 +22,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block-buffer" @@ -105,15 +84,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -177,7 +147,6 @@ dependencies = [ "humantime", "is-terminal", "log", - "regex", "termcolor", ] @@ -189,9 +158,9 @@ checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -214,16 +183,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda653ca797810c02f7ca4b804b40b8b95ae046eb989d356bce17919a8c25499" -[[package]] -name = "flate2" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "form_urlencoded" version = "1.2.0" @@ -251,9 +210,9 @@ checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -289,9 +248,9 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", "rustix", @@ -337,9 +296,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "log" @@ -347,12 +306,6 @@ version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - [[package]] name = "merge" version = "0.1.0" @@ -360,7 +313,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10bbef93abb1da61525bbc45eeaff6473a41907d19f8f9aa5168d214e10693e9" dependencies = [ "merge_derive", - "num-traits", ] [[package]] @@ -375,21 +327,12 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - [[package]] name = "nethsm-sdk-rs" -version = "0.1.0" -source = "git+https://github.com/Nitrokey/nethsm-sdk-rs?tag=0.2.0#0c0934a3c392214772bd780cc0ec92e9f7e8a880" +version = "0.3.0" +source = "git+https://github.com/Nitrokey/nethsm-sdk-rs?tag=0.3.0#f385e17c9fe337173e85bf9c30057d721800626b" dependencies = [ - "base64ct", + "base64", "serde", "serde_derive", "serde_json", @@ -422,15 +365,6 @@ dependencies = [ "x509-cert", ] -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - [[package]] name = "once_cell" version = "1.18.0" @@ -500,23 +434,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "regex" -version = "1.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" - [[package]] name = "ring" version = "0.16.20" @@ -534,11 +451,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.2" +version = "0.38.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4" +checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", "linux-raw-sys", @@ -815,7 +732,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" dependencies = [ "base64", - "flate2", "log", "once_cell", "rustls", diff --git a/pkcs11/Cargo.toml b/pkcs11/Cargo.toml index 36957aae..dd345691 100644 --- a/pkcs11/Cargo.toml +++ b/pkcs11/Cargo.toml @@ -8,23 +8,31 @@ name = "nethsm_pkcs11" crate-type = ["cdylib"] [dependencies] -libc = "0.2.80" +env_logger = { default-features = false, version = "0.10.0", features = [ + "auto-color", + "humantime", +] } +libc = { default-features = false, version = "0.2.80" } cryptoki-sys = "0.1.6" log = "0.4.19" -env_logger = "0.10.0" -merge = "0.1.0" -serde = { version = "1", features = ["derive"] } +merge = { features = [ + "derive", + "std", +], default-features = false, version = "0.1.0" } +serde = { version = "1", features = ["derive"], default-features = false } serde_yaml = "0.9.22" -serde_json = "1.0.64" +serde_json = { default-features = false, version = "1.0.64" } lazy_static = "1.4.0" -nethsm-sdk-rs = { git = "https://github.com/Nitrokey/nethsm-sdk-rs", tag = "0.2.0" } +nethsm-sdk-rs = { git = "https://github.com/Nitrokey/nethsm-sdk-rs", tag = "0.3.0" } # need to keep the same version as in the nethsm_sdk_rs crate -ureq = { version = "2", features = ["json"] } -rustls = { version = "0.21", features = ["dangerous_configuration"] } +ureq = { version = "2", default-features = false, features = ["json", "tls"] } +rustls = { version = "0.21", features = [ + "dangerous_configuration", +], default-features = false } rustls-native-certs = "0.6" -base64ct = { version = "1.6", features = ["alloc"] } +base64ct = { version = "1.6", default-features = false } hex = "0.4" -der = { version = "0.7", features = ["pem"] } +der = { version = "0.7", default-features = false } pem-rfc7468 = "0.7" -x509-cert = "0.2" -sha2 = "0.10" +x509-cert = { features = ["pem"], default-features = false, version = "0.2" } +sha2 = { default-features = false, version = "0.10" }