diff --git a/Cargo.lock b/Cargo.lock index d6557a823e..5c46658670 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,46 +8,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher", - "opaque-debug", -] - [[package]] name = "aho-corasick" version = "0.7.20" @@ -90,15 +50,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - [[package]] name = "async-compression" version = "0.3.15" @@ -123,75 +74,24 @@ dependencies = [ "winapi", ] -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.3" @@ -201,33 +101,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding", - "cipher", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "blowfish" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fa6a061124e37baba002e496d203e23ba3d7b73750be82dbfbc92913048a5b" -dependencies = [ - "byteorder", - "cipher", - "opaque-debug", -] - [[package]] name = "bstr" version = "1.3.0" @@ -240,45 +113,18 @@ dependencies = [ "serde", ] -[[package]] -name = "buffered-reader" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0dd286184b392a1ce6b3deecd073f0330df194bf935b87f852147d50d0d2d18" -dependencies = [ - "lazy_static", - "libc", -] - [[package]] name = "bumpalo" version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - [[package]] name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" -[[package]] -name = "cast5" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1285caf81ea1f1ece6b24414c521e625ad0ec94d880625c20f2e65d8d3f78823" -dependencies = [ - "byteorder", - "cipher", - "opaque-debug", -] - [[package]] name = "cc" version = "1.0.79" @@ -315,15 +161,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "clap" version = "3.2.23" @@ -358,16 +195,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "cmac" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73d4de4f7724e5fe70addfb2bd37c2abd2f95084a429d7773b0b9645499b4272" -dependencies = [ - "crypto-mac 0.10.1", - "dbl", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -395,12 +222,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82a90734b3d5dcf656e7624cca6bce9c3a90ee11f900e80141a7427ccfb3d317" -[[package]] -name = "const-oid" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279bc8fc53f788a75c7804af68237d1fce02cde1e275a886a4b320604dc2aeda" - [[package]] name = "content_inspector" version = "0.2.4" @@ -471,7 +292,7 @@ version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ - "autocfg 1.1.0", + "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "memoffset", @@ -487,12 +308,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - [[package]] name = "crypto-common" version = "0.1.6" @@ -503,36 +318,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "cipher", - "generic-array", - "subtle", -] - -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher", -] - [[package]] name = "curl" version = "0.4.44" @@ -563,19 +348,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "cvt" version = "0.1.1" @@ -629,58 +401,13 @@ dependencies = [ "syn", ] -[[package]] -name = "dbl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9" -dependencies = [ - "generic-array", -] - -[[package]] -name = "der" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb9d92785d1facb50567852ce75d0858630630e7eabea59cf7eb7474051087" -dependencies = [ - "const-oid", - "typenum", -] - -[[package]] -name = "des" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b24e7c748888aa2fa8bce21d8c64a52efc810663285315ac7476f7197a982fae" -dependencies = [ - "byteorder", - "cipher", - "opaque-debug", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.3", + "block-buffer", "crypto-common", ] @@ -727,59 +454,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" -[[package]] -name = "dyn-clone" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" - -[[package]] -name = "eax" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1f76e7a5e594b299a0fa9a99de627530725e341df41376aa342aecb2c5eb76e" -dependencies = [ - "aead", - "cipher", - "cmac", - "ctr", - "subtle", -] - -[[package]] -name = "ecdsa" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d33b390ab82f2e1481e331dbd0530895640179d2128ef9a79cc690b78d1eba" -dependencies = [ - "der", - "elliptic-curve", - "hmac", - "signature", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "sha2 0.9.9", - "zeroize", -] - [[package]] name = "effective-limits" version = "0.5.5" @@ -799,31 +473,6 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" -[[package]] -name = "elliptic-curve" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13e9b0c3c4170dcc2a12783746c4205d98e18957f57854251eea3f9750fe005" -dependencies = [ - "bitvec", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - -[[package]] -name = "ena" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e5d13ca2353ab7d0230988629def93914a8c4015f621f9b13ed2955614731d" -dependencies = [ - "log", -] - [[package]] name = "encoding_rs" version = "0.8.32" @@ -893,17 +542,6 @@ dependencies = [ "instant", ] -[[package]] -name = "ff" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a4d941a5b7c2a75222e2d44fcdf634a67133d9db31e177ae5ff6ecda852bfe" -dependencies = [ - "bitvec", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "filetime" version = "0.2.20" @@ -916,12 +554,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.25" @@ -977,12 +609,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "futures-channel" version = "0.3.26" @@ -1041,19 +667,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - [[package]] name = "getrandom" version = "0.2.8" @@ -1061,10 +674,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -1096,17 +707,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "group" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b3c1e8b4f1ca07e6605ea1be903a5f6956aec5c8a67fd44d56076631675ed8" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "h2" version = "0.3.16" @@ -1156,16 +756,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.1", - "digest 0.9.0", -] - [[package]] name = "home" version = "0.5.4" @@ -1299,16 +889,6 @@ dependencies = [ "cxx-build", ] -[[package]] -name = "idea" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdd4b114cf2265123bbdc5d32a39f96a343fbdf141267d2b5232b7e14caacb3" -dependencies = [ - "cipher", - "opaque-debug", -] - [[package]] name = "idna" version = "0.3.0" @@ -1325,7 +905,7 @@ version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ - "autocfg 1.1.0", + "autocfg", "hashbrown", ] @@ -1366,15 +946,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.5" @@ -1399,42 +970,11 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lalrpop" -version = "0.19.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" -dependencies = [ - "ascii-canvas", - "atty", - "bit-set", - "diff", - "ena", - "itertools", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "lalrpop-util" -version = "0.19.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" - [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] [[package]] name = "libc" @@ -1442,12 +982,6 @@ version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" -[[package]] -name = "libm" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" - [[package]] name = "libz-sys" version = "1.1.8" @@ -1475,16 +1009,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg 1.1.0", - "scopeguard", -] - [[package]] name = "log" version = "0.4.17" @@ -1505,17 +1029,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "md-5" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "memchr" version = "2.5.0" @@ -1528,15 +1041,9 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] -[[package]] -name = "memsec" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac78937f19a0c7807e45a931eac41f766f210173ec664ec046d58e6d388a5cb" - [[package]] name = "mime" version = "0.3.16" @@ -1582,12 +1089,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - [[package]] name = "nix" version = "0.26.2" @@ -1607,48 +1108,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" [[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - -[[package]] -name = "normpath" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972dec05f98e7c787ede35d7a9ea4735eb7788c299287352757b3def6cc1f7b5" -dependencies = [ - "windows-sys 0.45.0", -] - -[[package]] -name = "num-bigint" -version = "0.2.6" +name = "normalize-line-endings" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg 1.1.0", - "num-integer", - "num-traits", -] +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "num-bigint-dig" -version = "0.6.1" +name = "normpath" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d51546d704f52ef14b3c962b5776e53d5b862e5790e40a350d366c209bd7f7a" +checksum = "972dec05f98e7c787ede35d7a9ea4735eb7788c299287352757b3def6cc1f7b5" dependencies = [ - "autocfg 0.1.8", - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand 0.7.3", - "serde", - "smallvec", - "zeroize", + "windows-sys 0.45.0", ] [[package]] @@ -1657,18 +1128,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 1.1.0", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg 1.1.0", - "num-integer", + "autocfg", "num-traits", ] @@ -1678,7 +1138,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -1697,12 +1157,6 @@ version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "opener" version = "0.5.2" @@ -1760,7 +1214,7 @@ version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ - "autocfg 1.1.0", + "autocfg", "cc", "libc", "openssl-src", @@ -1784,76 +1238,12 @@ version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" -[[package]] -name = "p256" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f05f5287453297c4c16af5e2b04df8fd2a3008d70f252729650bc6d7ace5844" -dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.9.9", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "smallvec", - "windows-sys 0.45.0", -] - -[[package]] -name = "pem" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" -dependencies = [ - "base64 0.13.1", - "once_cell", - "regex", -] - [[package]] name = "percent-encoding" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" -[[package]] -name = "petgraph" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1866,16 +1256,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9c2f795bc591cb3384cb64082a578b89207ac92bb89c9d98c1ea2ace7cd8110" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.26" @@ -1888,12 +1268,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "proc-macro2" version = "1.0.51" @@ -1923,25 +1297,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -1949,18 +1304,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -1970,16 +1315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -1988,16 +1324,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -2037,7 +1364,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", + "getrandom", "redox_syscall", "thiserror", ] @@ -2089,7 +1416,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" dependencies = [ "async-compression", - "base64 0.21.0", + "base64", "bytes", "encoding_rs", "futures-core", @@ -2133,7 +1460,7 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac95c60a949a63fd2822f4964939662d8f2c16c4fa0624fd954bc6e703b9a3f6" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -2151,17 +1478,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "ripemd160" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "rs_tracing" version = "1.1.0" @@ -2172,28 +1488,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "rsa" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3648b669b10afeab18972c105e284a7b953a669b0be3514c27f9b17acab2f9cd" -dependencies = [ - "byteorder", - "digest 0.9.0", - "lazy_static", - "num-bigint-dig", - "num-integer", - "num-iter", - "num-traits", - "pem", - "rand 0.7.3", - "sha2 0.9.9", - "simple_asn1", - "subtle", - "thiserror", - "zeroize", -] - [[package]] name = "rustix" version = "0.36.8" @@ -2238,7 +1532,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.0", + "base64", ] [[package]] @@ -2264,7 +1558,7 @@ dependencies = [ "opener", "openssl", "pulldown-cmark", - "rand 0.8.5", + "rand", "regex", "remove_dir_all", "retry", @@ -2272,9 +1566,8 @@ dependencies = [ "same-file", "scopeguard", "semver", - "sequoia-openpgp", "serde", - "sha2 0.10.6", + "sha2", "sharded-slab", "strsim", "tar", @@ -2374,56 +1667,6 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" -[[package]] -name = "sequoia-openpgp" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70af2f594bf5261eb87be5060db1e40d6445686d2bb3ec41c014cf53701130a2" -dependencies = [ - "aes", - "anyhow", - "base64 0.13.1", - "block-modes", - "block-padding", - "blowfish", - "buffered-reader", - "cast5", - "chrono", - "cipher", - "des", - "digest 0.9.0", - "dyn-clone", - "eax", - "ecdsa", - "ed25519-dalek", - "generic-array", - "getrandom 0.2.8", - "idea", - "idna", - "lalrpop", - "lalrpop-util", - "lazy_static", - "libc", - "md-5", - "memsec", - "num-bigint-dig", - "p256", - "rand 0.7.3", - "rand_core 0.6.4", - "regex", - "regex-syntax", - "ripemd160", - "rsa", - "sha-1", - "sha1collisiondetection", - "sha2 0.9.9", - "thiserror", - "twofish", - "typenum", - "x25519-dalek", - "xxhash-rust", -] - [[package]] name = "serde" version = "1.0.152" @@ -2476,42 +1719,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha1collisiondetection" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66558a774ef5044cb4a834db5f5c7f95e139d2341d7f502fe6034afa7082461" -dependencies = [ - "digest 0.9.0", - "generic-array", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.6" @@ -2520,7 +1727,7 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] @@ -2538,54 +1745,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signature" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4" -dependencies = [ - "digest 0.9.0", - "rand_core 0.6.4", -] - [[package]] name = "similar" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" -[[package]] -name = "simple_asn1" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692ca13de57ce0613a363c8c2f1de925adebc81b04c923ac60c5488bb44abe4b" -dependencies = [ - "chrono", - "num-bigint", - "num-traits", -] - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - [[package]] name = "slab" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - [[package]] name = "smart-default" version = "0.6.0" @@ -2641,15 +1815,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "spki" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dae7e047abc519c96350e9484a96c6bf1492348af912fd3446dd2dc323f6268" -dependencies = [ - "der", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -2662,31 +1827,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared", - "precomputed-hash", -] - [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - [[package]] name = "syn" version = "1.0.109" @@ -2698,18 +1844,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - [[package]] name = "sys-info" version = "0.9.1" @@ -2720,12 +1854,6 @@ dependencies = [ "libc", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tar" version = "0.4.38" @@ -2856,15 +1984,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -2886,7 +2005,7 @@ version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" dependencies = [ - "autocfg 1.1.0", + "autocfg", "bytes", "libc", "memchr", @@ -3023,17 +2142,6 @@ dependencies = [ "toml_edit", ] -[[package]] -name = "twofish" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0028f5982f23ecc9a1bc3008ead4c664f843ed5d78acd3d213b99ff50c441bc2" -dependencies = [ - "byteorder", - "cipher", - "opaque-debug", -] - [[package]] name = "typenum" version = "1.16.0" @@ -3076,12 +2184,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "untrusted" version = "0.7.1" @@ -3141,12 +2243,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" @@ -3385,23 +2481,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - -[[package]] -name = "x25519-dalek" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077" -dependencies = [ - "curve25519-dalek", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "xattr" version = "0.2.3" @@ -3411,12 +2490,6 @@ dependencies = [ "libc", ] -[[package]] -name = "xxhash-rust" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "735a71d46c4d68d71d4b24d03fdc2b98e38cea81730595801db779c04fe80d70" - [[package]] name = "xz2" version = "0.1.7" @@ -3432,27 +2505,6 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - [[package]] name = "zstd" version = "0.12.3+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index 30f41e120b..c2312ac40f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,8 @@ [package] -authors = ["Daniel Silverstone ", "Diggory Blake "] +authors = [ + "Daniel Silverstone ", + "Diggory Blake ", +] build = "build.rs" description = "Manage multiple rust installations with ease" edition = "2021" @@ -13,7 +16,12 @@ version = "1.25.2" [features] curl-backend = ["download/curl-backend"] -default = ["curl-backend", "reqwest-backend", "reqwest-default-tls", "reqwest-rustls-tls"] +default = [ + "curl-backend", + "reqwest-backend", + "reqwest-default-tls", + "reqwest-rustls-tls", +] reqwest-backend = ["download/reqwest-backend"] vendored-openssl = ['openssl/vendored'] @@ -29,9 +37,9 @@ no-self-update = [] anyhow.workspace = true cfg-if = "1.0" chrono = "0.4" -clap = {version = "3", features = ["wrap_help"]} +clap = { version = "3", features = ["wrap_help"] } clap_complete = "3" -download = {path = "download", default-features = false} +download = { path = "download", default-features = false } effective-limits = "0.5.5" enum-map = "2.4.2" flate2 = "1" @@ -44,16 +52,15 @@ opener = "0.5.2" # Used by `curl` or `reqwest` backend although it isn't imported by our rustup : # this allows controlling the vendoring status without exposing the presence of # the download crate. -openssl = {version = "0.10", optional = true} -pulldown-cmark = {version = "0.9", default-features = false} +openssl = { version = "0.10", optional = true } +pulldown-cmark = { version = "0.9", default-features = false } rand = "0.8" regex = "1" -remove_dir_all = {version= "0.8.1", features=["parallel"]} +remove_dir_all = { version = "0.8.1", features = ["parallel"] } same-file = "1" scopeguard = "1" semver = "1.0" -serde = {version = "1.0", features = ["derive"]} -sequoia-openpgp = { version = "1.13", default-features = false, features = ["crypto-rust", "allow-experimental-crypto", "allow-variable-time-crypto"] } +serde = { version = "1.0", features = ["derive"] } sha2 = "0.10" sharded-slab = "0.1.1" strsim = "0.10" @@ -64,11 +71,11 @@ term = "=0.7.0" thiserror.workspace = true threadpool = "1" toml = "0.5" +trycmd = "0.14.13" url.workspace = true wait-timeout = "0.2" xz2 = "0.1.3" zstd = "0.12" -trycmd = "0.14.13" [dependencies.retry] default-features = false @@ -85,34 +92,34 @@ winreg = "0.11" [target."cfg(windows)".dependencies.winapi] features = [ - "combaseapi", - "errhandlingapi", - "fileapi", - "handleapi", - "ioapiset", - "jobapi", - "jobapi2", - "minwindef", - "processthreadsapi", - "psapi", - "shlobj", - "shtypes", - "synchapi", - "sysinfoapi", - "tlhelp32", - "userenv", - "winbase", - "winerror", - "winioctl", - "winnt", - "winuser", + "combaseapi", + "errhandlingapi", + "fileapi", + "handleapi", + "ioapiset", + "jobapi", + "jobapi2", + "minwindef", + "processthreadsapi", + "psapi", + "shlobj", + "shtypes", + "synchapi", + "sysinfoapi", + "tlhelp32", + "userenv", + "winbase", + "winerror", + "winioctl", + "winnt", + "winuser", ] version = "0.3" [dev-dependencies] -walkdir = "2" -once_cell = "1.17.1" enum-map = "2.4.2" +once_cell = "1.17.1" +walkdir = "2" [build-dependencies] lazy_static = "1" @@ -139,4 +146,3 @@ lto = true # Reduce build time by setting proc-macro crates non optimized. [profile.release.build-override] opt-level = 0 - diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs index ecb83806a4..54cf50a937 100644 --- a/src/cli/rustup_mode.rs +++ b/src/cli/rustup_mode.rs @@ -135,7 +135,6 @@ pub fn main() -> Result { ("active-toolchain", m) => handle_epipe(show_active_toolchain(cfg, m))?, ("home", _) => handle_epipe(show_rustup_home(cfg))?, ("profile", _) => handle_epipe(show_profile(cfg))?, - ("keys", _) => handle_epipe(show_keys(cfg))?, _ => handle_epipe(show(cfg, c))?, }, None => handle_epipe(show(cfg, c))?, @@ -1668,15 +1667,6 @@ fn show_profile(cfg: &Cfg) -> Result { Ok(utils::ExitCode(0)) } -fn show_keys(cfg: &Cfg) -> Result { - for key in cfg.get_pgp_keys() { - for l in key.show_key()? { - info!("{}", l); - } - } - Ok(utils::ExitCode(0)) -} - #[derive(Copy, Clone, Debug, PartialEq)] pub(crate) enum CompletionCommand { Rustup, diff --git a/src/config.rs b/src/config.rs index a4cce22eb3..240dd59c56 100644 --- a/src/config.rs +++ b/src/config.rs @@ -7,13 +7,11 @@ use std::str::FromStr; use std::sync::Arc; use anyhow::{anyhow, bail, Context, Result}; -use sequoia_openpgp::{parse::Parse, Cert}; use serde::Deserialize; use thiserror::Error as ThisError; use crate::cli::self_update::SelfUpdateMode; use crate::dist::download::DownloadCfg; -use crate::dist::signatures::sequoia_policy; use crate::dist::{ dist::{self, Profile}, temp, @@ -155,77 +153,6 @@ impl<'a> OverrideCfg<'a> { } } -lazy_static::lazy_static! { - static ref BUILTIN_PGP_KEY: Cert = - Cert::from_bytes(&include_bytes!("rust-key.pgp.ascii")[..]).unwrap(); -} - -#[allow(clippy::large_enum_variant)] // Builtin is tiny, the rest are sane -#[derive(Debug)] -pub enum PgpPublicKey { - Builtin, - FromEnvironment(PathBuf, Cert), - FromConfiguration(PathBuf, Cert), -} - -impl PgpPublicKey { - /// Retrieve the key. - pub(crate) fn cert(&self) -> &Cert { - match self { - Self::Builtin => &BUILTIN_PGP_KEY, - Self::FromEnvironment(_, k) => k, - Self::FromConfiguration(_, k) => k, - } - } - - /// Display the key in detail for the user - pub(crate) fn show_key(&self) -> Result> { - fn format_hex(bytes: &[u8], separator: &str, every: usize) -> Result { - use std::fmt::Write; - let mut ret = String::new(); - let mut wait = every; - for b in bytes.iter() { - if wait == 0 { - ret.push_str(separator); - wait = every; - } - wait -= 1; - write!(ret, "{b:02X}")?; - } - Ok(ret) - } - let mut ret = vec![format!("from {self}")]; - let cert = self.cert(); - let keyid = format_hex(cert.keyid().as_bytes(), "-", 4)?; - let algo = cert.primary_key().pk_algo(); - let fpr = format_hex(cert.fingerprint().as_bytes(), " ", 2)?; - let p = sequoia_policy(); - - let uid0 = cert - .with_policy(&p, None)? - .primary_userid() - .map(|u| u.userid().to_string()) - .unwrap_or_else(|_| "".into()); - ret.push(format!(" {algo:?}/{keyid} - {uid0}")); - ret.push(format!(" Fingerprint: {fpr}")); - Ok(ret) - } -} - -impl Display for PgpPublicKey { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Builtin => write!(f, "builtin Rust release key"), - Self::FromEnvironment(p, _) => { - write!(f, "key specified in RUSTUP_PGP_KEY ({})", p.display()) - } - Self::FromConfiguration(p, _) => { - write!(f, "key specified in configuration file ({})", p.display()) - } - } - } -} - pub(crate) const UNIX_FALLBACK_SETTINGS: &str = "/etc/rustup/settings.toml"; pub struct Cfg { @@ -237,7 +164,6 @@ pub struct Cfg { pub update_hash_dir: PathBuf, pub download_dir: PathBuf, pub temp_cfg: temp::Cfg, - pgp_keys: Vec, pub toolchain_override: Option, pub env_override: Option, pub dist_root_url: String, @@ -271,35 +197,6 @@ impl Cfg { let update_hash_dir = rustup_dir.join("update-hashes"); let download_dir = rustup_dir.join("downloads"); - // PGP keys - let mut pgp_keys: Vec = vec![PgpPublicKey::Builtin]; - - if let Some(ref s_path) = process().var_os("RUSTUP_PGP_KEY") { - let path = PathBuf::from(s_path); - let file = utils::open_file("RUSTUP_PGP_KEY", &path)?; - let key = Cert::from_reader(file).map_err(|error| RustupError::InvalidPgpKey { - path: s_path.into(), - source: error, - })?; - - pgp_keys.push(PgpPublicKey::FromEnvironment(path, key)); - } - settings_file.with(|s| { - if let Some(s) = &s.pgp_keys { - let path = PathBuf::from(s); - let file = utils::open_file("PGP Key from config", &path)?; - let key = Cert::from_reader(file).map_err(|error| { - anyhow!(RustupError::InvalidPgpKey { - path: s.into(), - source: error, - }) - })?; - - pgp_keys.push(PgpPublicKey::FromConfiguration(path, key)); - } - Ok(()) - })?; - // Environment override let env_override = process() .var("RUSTUP_TOOLCHAIN") @@ -338,7 +235,6 @@ impl Cfg { update_hash_dir, download_dir, temp_cfg, - pgp_keys, notify_handler, toolchain_override: None, env_override, @@ -364,14 +260,9 @@ impl Cfg { temp_cfg: &self.temp_cfg, download_dir: &self.download_dir, notify_handler, - pgp_keys: self.get_pgp_keys(), } } - pub(crate) fn get_pgp_keys(&self) -> &[PgpPublicKey] { - &self.pgp_keys - } - pub(crate) fn set_profile_override(&mut self, profile: dist::Profile) { self.profile_override = Some(profile); } diff --git a/src/dist/dist.rs b/src/dist/dist.rs index ec1a59e37c..480e61595e 100644 --- a/src/dist/dist.rs +++ b/src/dist/dist.rs @@ -997,7 +997,6 @@ fn try_update_from_dist_( update_hash, download.temp_cfg, &download.notify_handler, - download.pgp_keys, ); // inspect, determine what context to add, then process afterwards. let mut download_not_exists = false; diff --git a/src/dist/download.rs b/src/dist/download.rs index 373c42644d..9cf4006a0e 100644 --- a/src/dist/download.rs +++ b/src/dist/download.rs @@ -6,7 +6,6 @@ use anyhow::{anyhow, Context, Result}; use sha2::{Digest, Sha256}; use url::Url; -use crate::config::PgpPublicKey; use crate::dist::notifications::*; use crate::dist::temp; use crate::errors::*; @@ -20,7 +19,6 @@ pub struct DownloadCfg<'a> { pub temp_cfg: &'a temp::Cfg, pub download_dir: &'a PathBuf, pub notify_handler: &'a dyn Fn(Notification<'_>), - pub pgp_keys: &'a [PgpPublicKey], } pub(crate) struct File { @@ -137,43 +135,6 @@ impl<'a> DownloadCfg<'a> { utils::read_file("hash", &hash_file).map(|s| s[0..64].to_owned()) } - fn download_signature(&self, url: &str) -> Result { - let sig_url = utils::parse_url(&(url.to_owned() + ".asc"))?; - let sig_file = self.temp_cfg.new_file()?; - - utils::download_file(&sig_url, &sig_file, None, &|n| { - (self.notify_handler)(n.into()) - })?; - - utils::read_file("signature", &sig_file) - } - - fn check_signature(&self, url: &str, file: &temp::File<'_>) -> Result<&PgpPublicKey> { - assert!( - !self.pgp_keys.is_empty(), - "At least the builtin key must be present" - ); - - let signature = self - .download_signature(url) - .with_context(|| format!("failed to download signature file {url}"))?; - - let file_path: &Path = file; - let content = std::fs::File::open(file_path).with_context(|| RustupError::ReadingFile { - name: "channel data", - path: PathBuf::from(file_path), - })?; - - let sig_result = - crate::dist::signatures::verify_signature(content, &signature, self.pgp_keys)?; - if let Some(keyidx) = sig_result { - let key = &self.pgp_keys[keyidx]; - Ok(key) - } else { - Err(anyhow!(format!("signature verification failed for {url}"))) - } - } - /// Downloads a file, sourcing its hash from the same url with a `.sha256` suffix. /// If `update_hash` is present, then that will be compared to the downloaded hash, /// and if they match, the download is skipped. @@ -224,14 +185,6 @@ impl<'a> DownloadCfg<'a> { (self.notify_handler)(Notification::ChecksumValid(url_str)); } - // No signatures for tarballs for now. - if !url_str.ends_with(".tar.gz") && !url_str.ends_with(".tar.xz") { - match self.check_signature(url_str, &file) { - Ok(key) => (self.notify_handler)(Notification::SignatureValid(url_str, key)), - Err(_) => (self.notify_handler)(Notification::SignatureInvalid(url_str)), - } - } - Ok(Some((file, partial_hash))) } } diff --git a/src/dist/manifestation.rs b/src/dist/manifestation.rs index 26e9536d37..a58b5bae86 100644 --- a/src/dist/manifestation.rs +++ b/src/dist/manifestation.rs @@ -7,7 +7,6 @@ use anyhow::{anyhow, bail, Context, Result}; use retry::delay::NoDelay; use retry::{retry, OperationResult}; -use crate::config::PgpPublicKey; use crate::dist::component::{ Components, Package, TarGzPackage, TarXzPackage, TarZStdPackage, Transaction, }; @@ -378,7 +377,6 @@ impl Manifestation { update_hash: Option<&Path>, temp_cfg: &temp::Cfg, notify_handler: &dyn Fn(Notification<'_>), - pgp_keys: &[PgpPublicKey], ) -> Result> { // If there's already a v2 installation then something has gone wrong if self.read_config()?.is_some() { @@ -414,7 +412,6 @@ impl Manifestation { download_dir: &dld_dir, temp_cfg, notify_handler, - pgp_keys, }; let dl = dlcfg.download_and_check(&url, update_hash, ".tar.gz")?; diff --git a/src/dist/mod.rs b/src/dist/mod.rs index 36d05f1c08..67a04b0c01 100644 --- a/src/dist/mod.rs +++ b/src/dist/mod.rs @@ -13,5 +13,4 @@ pub mod manifest; pub mod manifestation; pub(crate) mod notifications; pub mod prefix; -pub(crate) mod signatures; pub(crate) mod triple; diff --git a/src/dist/notifications.rs b/src/dist/notifications.rs index f6e269843c..7f82ae4ac8 100644 --- a/src/dist/notifications.rs +++ b/src/dist/notifications.rs @@ -1,4 +1,3 @@ -use crate::config::PgpPublicKey; use crate::dist::dist::{TargetTriple, ToolchainDesc}; use crate::dist::manifest::Component; use crate::dist::temp; @@ -18,7 +17,6 @@ pub enum Notification<'a> { CantReadUpdateHash(&'a Path), NoUpdateHash(&'a Path), ChecksumValid(&'a str), - SignatureValid(&'a str, &'a PgpPublicKey), FileAlreadyDownloaded, CachedFileChecksumFailed, RollingBack, @@ -60,7 +58,6 @@ impl<'a> Notification<'a> { Temp(n) => n.level(), Utils(n) => n.level(), ChecksumValid(_) - | SignatureValid(_, _) | NoUpdateHash(_) | FileAlreadyDownloaded | DownloadingLegacyManifest => NotificationLevel::Verbose, @@ -104,13 +101,6 @@ impl<'a> Display for Notification<'a> { ), NoUpdateHash(path) => write!(f, "no update hash at: '{}'", path.display()), ChecksumValid(_) => write!(f, "checksum passed"), - SignatureValid(url, key) => (|| { - writeln!(f, "Good signature from on {url} from:")?; - for l in key.show_key().map_err(|_| std::fmt::Error)?.iter() { - writeln!(f, "{l}")?; - } - Ok(()) - })(), FileAlreadyDownloaded => write!(f, "reusing previously downloaded file"), CachedFileChecksumFailed => write!(f, "bad checksum for cached download"), RollingBack => write!(f, "rolling back changes"), diff --git a/src/dist/signatures.rs b/src/dist/signatures.rs deleted file mode 100644 index ea599cadb6..0000000000 --- a/src/dist/signatures.rs +++ /dev/null @@ -1,101 +0,0 @@ -//! Signature verification support for Rustup. - -// TODO: Determine whether we want external keyring support - -use std::io::Read; - -use anyhow::Result; - -use sequoia_openpgp::{ - parse::{stream::*, Parse}, - policy::{HashAlgoSecurity, StandardPolicy}, - types::HashAlgorithm, - Cert, KeyHandle, -}; - -use crate::config::PgpPublicKey; - -pub(crate) fn sequoia_policy() -> StandardPolicy<'static> { - let mut policy = StandardPolicy::new(); - - // The builtin Rust signature key uses SHA-1 for its own signature, even though the individual - // signatures generated by it nowadays use SHA-512. Sequoia added a cutoff date for SHA1, - // 2023-02-01, which caused warnings to be displayed to rustup users from that day onwards. - // - // To keep supporting the Rust signature key, we allow the SHA-1 algorithm in rustup without a - // cutoff date when verifying the signature key bindings. SHA-1 data signatures are still - // disallowed. - policy.reject_hash_property_at( - HashAlgorithm::SHA1, - HashAlgoSecurity::SecondPreImageResistance, - None, - ); - - policy -} - -/// Returns the index of the cert in `certs` that verifies a -/// signature. -/// -/// Ignores any signatures that are bad for any reason. If no -/// signature could be verified, returns `None`. -// XXX: This is a bit of an odd policy. Shouldn't we fail if we -// encounter a single bad signature (bad as in checksum doesn't check -// out, not bad as in we don't have the key)? -pub(crate) fn verify_signature( - content: T, - signature: &str, - certs: &[PgpPublicKey], -) -> Result> { - let p = sequoia_policy(); - - let helper = Helper::new(certs); - let mut v = DetachedVerifierBuilder::from_reader(signature.as_bytes())? - .with_policy(&p, None, helper)?; - v.verify_reader(content)?; - Ok(v.into_helper().index) -} - -struct Helper<'a> { - certs: &'a [PgpPublicKey], - // The index of the cert in certs that successfully verified a - // signature. - index: Option, -} - -impl<'a> Helper<'a> { - fn new(certs: &'a [PgpPublicKey]) -> Self { - Helper { certs, index: None } - } -} - -impl VerificationHelper for Helper<'_> { - fn get_certs(&mut self, _: &[KeyHandle]) -> anyhow::Result> { - Ok(self.certs.iter().map(|c| c.cert().clone()).collect()) - } - - fn check(&mut self, structure: MessageStructure<'_>) -> anyhow::Result<()> { - for layer in structure.into_iter() { - match layer { - MessageLayer::SignatureGroup { results } => { - // We ignore any errors for now. - for GoodChecksum { ka, .. } in results.into_iter().flatten() { - // A good signature! Find the index - // of the signer key and return - // success. - self.index = self.certs.iter().position(|c| c.cert() == ka.cert()); - assert!(self.index.is_some()); - } - } - MessageLayer::Compression { .. } => { - unreachable!("we're verifying detached signatures") - } - MessageLayer::Encryption { .. } => { - unreachable!("we're verifying detached signatures") - } - } - } - - Ok(()) - } -} diff --git a/src/rust-key.pgp.ascii b/src/rust-key.pgp.ascii deleted file mode 100644 index 93e2282c7a..0000000000 --- a/src/rust-key.pgp.ascii +++ /dev/null @@ -1,86 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1 - -mQINBFJEwMkBEADlPACa2K7reD4x5zd8afKx75QYKmxqZwywRbgeICeD4bKiQoJZ -dUjmn1LgrGaXuBMKXJQhyA34e/1YZel/8et+HPE5XpljBfNYXWbVocE1UMUTnFU9 -CKXa4AhJ33f7we2/QmNRMUifw5adPwGMg4D8cDKXk02NdnqQlmFByv0vSaArR5kn -gZKnLY6o0zZ9Buyy761Im/ShXqv4ATUgYiFc48z33G4j+BDmn0ryGr1aFdP58tHp -gjWtLZs0iWeFNRDYDje6ODyu/MjOyuAWb2pYDH47Xu7XedMZzenH2TLM9yt/hyOV -xReDPhvoGkaO8xqHioJMoPQi1gBjuBeewmFyTSPS4deASukhCFOcTsw/enzJagiS -ZAq6Imehduke+peAL1z4PuRmzDPO2LPhVS7CDXtuKAYqUV2YakTq8MZUempVhw5n -LqVaJ5/XiyOcv405PnkT25eIVVVghxAgyz6bOU/UMjG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07dFz4pgkVM -afxpVR7fmrMZ0t+yENd+9qzyAZs0ksxORoc2ze90SCx2jwEX/3K+m4I0hP2H/w5W -gqdvuRLiqf+4BGW4zqWkLLlNIe/okt0r82SwHtDN0Ui1asmZTGj6sm8SXtwx+5cE -38MttWqjDiibQOSthRVcETByRYM8KcjYSUCi4PoBc3NpDONkFbZm6XofR/f5mTcl -2jDw6fIeVc4Hd1jBGajNzEqtneqqbdAkPQaLsuD2TMkQfTDJfE/IljwjrhDa9Mi+ -odtnMWq8vlwOZZ24/8/BNK5qXuCYL67O7AJB4ZQ6BT+g4z96iRLbupzu/XJyXkQF -rOY/Ghegvn7fDrnt2KC9MpgeFBXzUp+k5rzUdF8jbCx5apVjA1sWXB9Kh3L+DUwF -Mve696B5tlHyc1KxjHR6w9GRsh4= -=5FXw ------END PGP PUBLIC KEY BLOCK----- diff --git a/src/utils/utils.rs b/src/utils/utils.rs index 694b53351e..2db3368bef 100644 --- a/src/utils/utils.rs +++ b/src/utils/utils.rs @@ -42,13 +42,6 @@ where }) } -pub(crate) fn open_file(name: &'static str, path: &Path) -> Result { - File::open(path).with_context(|| RustupError::ReadingFile { - name, - path: PathBuf::from(path), - }) -} - pub fn read_file(name: &'static str, path: &Path) -> Result { fs::read_to_string(path).with_context(|| RustupError::ReadingFile { name, diff --git a/tests/mock/dist.rs b/tests/mock/dist.rs index 0d0b17bc48..8d1aad2b8c 100644 --- a/tests/mock/dist.rs +++ b/tests/mock/dist.rs @@ -3,7 +3,6 @@ use crate::mock::MockInstallerBuilder; use lazy_static::lazy_static; -use sequoia_openpgp::{parse::Parse, Cert}; use sha2::{Digest, Sha256}; use std::collections::HashMap; use std::fs::{self, File}; @@ -294,13 +293,6 @@ impl MockDistServer { let archive_hash_path = self.path.join(format!("{archive_manifest_name}.sha256")); hard_link(&hash_path, archive_hash_path).unwrap(); - - let signature = create_signature(buf.as_bytes()).unwrap(); - let sig_path = self.path.join(format!("{manifest_name}.asc")); - write_file(&sig_path, &signature); - - let archive_sig_path = self.path.join(format!("{archive_manifest_name}.asc")); - hard_link(sig_path, archive_sig_path).unwrap(); } fn write_manifest_v2( @@ -452,13 +444,6 @@ impl MockDistServer { .path .join(format!("{archive_manifest_name}.toml.sha256")); hard_link(hash_path, archive_hash_path).unwrap(); - - let signature = create_signature(manifest_content.as_bytes()).unwrap(); - let sig_path = self.path.join(format!("{manifest_name}.toml.asc")); - write_file(&sig_path, &signature); - - let archive_sig_path = self.path.join(format!("{archive_manifest_name}.toml.asc")); - hard_link(sig_path, archive_sig_path).unwrap(); } } @@ -527,43 +512,3 @@ pub fn write_file(dst: &Path, contents: &str) { .and_then(|mut f| f.write_all(contents.as_bytes())) .unwrap(); } - -const SIGNING_KEY_BYTES: &[u8] = include_bytes!("signing-key.asc"); -const PUB_SIGNING_KEY_BYTES: &[u8] = include_bytes!("signing-key.pub.asc"); - -fn get_secret_key() -> Cert { - Cert::from_bytes(SIGNING_KEY_BYTES).unwrap() -} - -pub fn get_public_key() -> Cert { - Cert::from_bytes(PUB_SIGNING_KEY_BYTES).unwrap() -} - -pub fn create_signature(data: &[u8]) -> anyhow::Result { - use sequoia_openpgp::serialize::stream::*; - let key = get_secret_key(); - - let p = sequoia_openpgp::policy::StandardPolicy::new(); - let signing_keypair = key - .with_policy(&p, None)? - .keys() - .secret() - .supported() - .alive() - .revoked(false) - .for_signing() - .next() - .unwrap() - .key() - .clone() - .into_keypair()?; - - let mut buf = Vec::new(); - let message = Message::new(&mut buf); - let message = Armorer::new(message).build()?; - let mut message = Signer::new(message, signing_keypair).detached().build()?; - message.write_all(data)?; - message.finalize()?; - - Ok(String::from_utf8(buf)?) -} diff --git a/tests/mock/signing-key.asc b/tests/mock/signing-key.asc deleted file mode 100644 index 155575fc16..0000000000 --- a/tests/mock/signing-key.asc +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN PGP PRIVATE KEY BLOCK----- - -xVgEXar+RxYJKwYBBAHaRw8BAQdAELDAsC7PGua5I4xTf87qMCXJjZCNXDfUnJnF -BIduqMIAAQCy6oto/oUmbG6RRKv5SawnqG4hN78bQL+n3qXdRu5V1RFUzRlNZS1Y -IDxtZS14MjU1MTlAbWFpbC5jb20+wosEEBYIADMCGQEFAl2q/kcCGwIECwkIBwYV -CAkKCwIDFgIBFiEEtpXvkr5c0k7TkSTdH2I5lCpILVEACgkQH2I5lCpILVGFsAEA -j5ldAowGMlnIz7EWNJgSjaZDLX4nbsEmOWUQfbuXsycBAMtujUBzsA+arKEOkelv -RGydmFgwlAymjaRp+oPJeLQM -=BQNA ------END PGP PRIVATE KEY BLOCK----- \ No newline at end of file diff --git a/tests/mock/signing-key.pub.asc b/tests/mock/signing-key.pub.asc deleted file mode 100644 index 04bdba65ab..0000000000 --- a/tests/mock/signing-key.pub.asc +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -xjMEXar+RxYJKwYBBAHaRw8BAQdAELDAsC7PGua5I4xTf87qMCXJjZCNXDfUnJnF -BIduqMLNGU1lLVggPG1lLXgyNTUxOUBtYWlsLmNvbT7CiwQQFggAMwIZAQUCXasD -1AIbAgQLCQgHBhUICQoLAgMWAgEWIQS2le+SvlzSTtORJN0fYjmUKkgtUQAKCRAf -YjmUKkgtUVFNAP4nHr5GXDyHW92R/NTRM7IkhUn1I3e8SdboM+9solmsDgD/ViHK -CufKoMxFjfQuHZ7dYch/z8ChJ4HcHRqo7+H5WQ4= -=tEfj ------END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/tests/suite/cli_v2.rs b/tests/suite/cli_v2.rs index a53e3a3294..ef13462882 100644 --- a/tests/suite/cli_v2.rs +++ b/tests/suite/cli_v2.rs @@ -1021,12 +1021,6 @@ fn make_component_unavailable(config: &Config, name: &str, target: &str) { let hash_path = manifest_path.with_extension("toml.sha256"); println!("{}", hash_path.display()); create_hash(&manifest_path, &hash_path); - - // update that signature - use crate::mock::dist::{create_signature, write_file}; - let signature = create_signature(manifest_str.as_bytes()).unwrap(); - let sig_path = manifest_path.with_extension("toml.asc"); - write_file(&sig_path, &signature); } #[test] @@ -1333,50 +1327,6 @@ info: installing component 'rustc' }); } -/// Invalidates the signature on the manifest of the nightly channel. -fn make_signature_invalid(config: &Config) { - let manifest_path = config - .distdir - .as_ref() - .unwrap() - .join("dist/channel-rust-nightly.toml"); - - // Set signature to sth bogus. - use crate::mock::dist::{create_signature, write_file}; - let signature = create_signature(b"hello invalid").unwrap(); - let sig_path = manifest_path.with_extension("toml.asc"); - write_file(&sig_path, &signature); -} - -#[test] -fn warn_on_invalid_signature() { - setup(&|config| { - make_signature_invalid(config); - - config.expect_stderr_ok( - &["rustup", "update", "nightly", ], - &format!( - "warning: Signature verification failed for 'file://{}/dist/channel-rust-nightly.toml'", - config.distdir.as_ref().unwrap().display(), - ), - ); - }); -} - -#[test] -fn check_pgp_keys() { - setup(&|config| { - config.expect_stderr_ok( - &["rustup", "show", "keys"], - "Fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE", - ); - config.expect_stderr_ok( - &["rustup", "show", "keys"], - "Fingerprint: B695 EF92 BE5C D24E D391 24DD 1F62 3994 2A48 2D51", - ); - }) -} - #[test] fn install_allow_downgrade() { clitools::test(Scenario::MissingComponent, &|config| { diff --git a/tests/suite/dist.rs b/tests/suite/dist.rs index 6f7005ee0f..245482439d 100644 --- a/tests/suite/dist.rs +++ b/tests/suite/dist.rs @@ -23,7 +23,6 @@ use rustup::dist::Notification; use rustup::errors::RustupError; use rustup::utils::raw as utils_raw; use rustup::utils::utils; -use rustup::PgpPublicKey; use crate::mock::dist::*; use crate::mock::{MockComponentBuilder, MockFile, MockInstallerBuilder}; @@ -553,10 +552,6 @@ fn setup_from_dist_server( notify_handler: &|event| { println!("{event}"); }, - pgp_keys: &[PgpPublicKey::FromEnvironment( - "test-key".into(), - get_public_key(), - )], }; currentprocess::with( @@ -2091,10 +2086,6 @@ fn reuse_downloaded_file() { reuse_notification_fired.set(true); } }, - pgp_keys: &[PgpPublicKey::FromEnvironment( - "test-key".into(), - get_public_key(), - )], }; update_from_dist( @@ -2162,10 +2153,6 @@ fn checks_files_hashes_before_reuse() { noticed_bad_checksum.set(true); } }, - pgp_keys: &[PgpPublicKey::FromEnvironment( - "test-key".into(), - get_public_key(), - )], }; update_from_dist(