From 041a41c01cdcb75a4992ac155e7ef1cdd5651413 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 24 Nov 2023 16:05:44 +0100 Subject: [PATCH] Port to sequoia-openpgp 1.17. --- Cargo.lock | 449 ++++++++++++++++++------------------ Cargo.toml | 4 +- src/commands/armor.rs | 4 +- src/commands/decrypt.rs | 1 + src/commands/encrypt.rs | 2 +- src/commands/key/userid.rs | 1 + src/commands/keyring.rs | 12 +- src/commands/net.rs | 2 +- src/commands/packet/dump.rs | 2 + src/commands/wot.rs | 8 +- 10 files changed, 243 insertions(+), 242 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a12d74b8..af4ea13f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,6 +36,21 @@ dependencies = [ "cfg-if", "cipher", "cpufeatures", + "zeroize", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", ] [[package]] @@ -44,7 +59,7 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom", "once_cell", "version_check", ] @@ -137,7 +152,7 @@ checksum = "79fa67157abdfd688a259b6648808757db9347af834624f27ec646da976aee5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -232,15 +247,6 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" -[[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.4" @@ -271,18 +277,18 @@ dependencies = [ [[package]] name = "botan" -version = "0.10.3" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "892c489ddae46dd4748fff8b41ad1fb17d405892fb6978ef470441eddb2df4ef" +checksum = "350081af1a3c6883f8a1f863ac553bfe6922589aad60008a70947765ed57c53e" dependencies = [ "botan-sys", ] [[package]] name = "botan-sys" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8f94a43f34344aabf27d50838a2b38aa8aad7c7d1e941e8abb015f608c972b1" +checksum = "9f49dde1b8ebd2996cc41c55c39f6ef8b54e38148d8973aeba0792b87b1621ca" [[package]] name = "bstr" @@ -298,9 +304,9 @@ dependencies = [ [[package]] name = "buffered-reader" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d3bea5bcc3ecc38fe5388e6bc35e6fe7bd665eb3ae9a44283e15b91ad3867d" +checksum = "2b9b0a25eb06e83579bc985d836e1e3b957a7201301b48538764d2b2e78090d4" dependencies = [ "bzip2", "flate2", @@ -347,6 +353,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "camellia" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3264e2574e9ef2b53ce6f536dea83a69ac0bc600b762d1523ff83fe07230ce30" +dependencies = [ + "byteorder", + "cipher", +] + [[package]] name = "cast5" version = "0.11.1" @@ -409,6 +425,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -487,7 +504,7 @@ checksum = "8543454e3c3f5126effff9cd44d562af4e31fb8ce1cc0d3dcd8f084515dbc1aa" dependencies = [ "cipher", "dbl", - "digest 0.10.7", + "digest", ] [[package]] @@ -610,7 +627,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -622,7 +639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "typenum", ] @@ -637,28 +654,30 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.2.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "platforms", + "rustc_version", "subtle", "zeroize", ] [[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", - "subtle-ng", - "zeroize", + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] @@ -732,22 +751,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[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.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -827,6 +837,22 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d1b11bd5e7e98406c6ff39fbc94d6e910a489b978ce7f17c19fce91a1195b7a" +[[package]] +name = "dsa" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d88afbb2443ba68ef8593de497e830b2e276434e1408f85cd760b1107b44ead0" +dependencies = [ + "digest", + "num-bigint-dig", + "num-traits", + "pkcs8", + "rfc6979", + "sha2", + "signature", + "zeroize", +] + [[package]] name = "dyn-clone" version = "1.0.11" @@ -862,32 +888,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" dependencies = [ "der", - "digest 0.10.7", + "digest", "elliptic-curve", "rfc6979", - "signature 2.1.0", + "signature", "spki", ] [[package]] name = "ed25519" -version = "1.5.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "signature 1.6.4", + "pkcs8", + "signature", ] [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek", "ed25519", - "rand 0.7.3", - "sha2 0.9.9", + "rand_core", + "serde", + "sha2", + "subtle", "zeroize", ] @@ -905,14 +934,14 @@ checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ "base16ct", "crypto-bigint", - "digest 0.10.7", + "digest", "ff", "generic-array", "group", "hkdf", "pem-rfc7468", "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", @@ -1047,10 +1076,16 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" + [[package]] name = "file_diff" version = "1.0.0" @@ -1177,7 +1212,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -1239,19 +1274,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -1265,6 +1287,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "gimli" version = "0.27.3" @@ -1331,7 +1363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -1399,7 +1431,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1551,16 +1583,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -1684,9 +1706,9 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.19.12" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" dependencies = [ "ascii-canvas", "bit-set", @@ -1697,7 +1719,7 @@ dependencies = [ "lalrpop-util", "petgraph", "regex", - "regex-syntax 0.6.29", + "regex-syntax 0.7.2", "string_cache", "term", "tiny-keccak", @@ -1706,9 +1728,9 @@ dependencies = [ [[package]] name = "lalrpop-util" -version = "0.19.12" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" [[package]] name = "lazy_static" @@ -1842,7 +1864,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1916,7 +1938,7 @@ version = "7.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9fdccf3eae7b161910d2daa2f0155ca35041322e8fe5c5f1f2c9d0b12356336" dependencies = [ - "getrandom 0.2.10", + "getrandom", "libc", "nettle-sys", "thiserror", @@ -2017,7 +2039,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand 0.8.5", + "rand", "smallvec", "zeroize", ] @@ -2093,7 +2115,7 @@ dependencies = [ "anyhow", "dirs 4.0.0", "fd-lock", - "sha1collisiondetection", + "sha1collisiondetection 0.2.7", "tempfile", "thiserror", ] @@ -2121,7 +2143,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -2169,7 +2191,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2 0.10.7", + "sha2", ] [[package]] @@ -2246,7 +2268,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -2257,7 +2279,7 @@ checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2", ] [[package]] @@ -2328,6 +2350,24 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "platforms" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" + +[[package]] +name = "polyval" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2405,9 +2445,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -2432,9 +2472,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2449,19 +2489,6 @@ dependencies = [ "nibble_vec", ] -[[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" @@ -2469,18 +2496,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]] @@ -2490,16 +2507,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]] @@ -2508,16 +2516,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", -] - -[[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]] @@ -2566,7 +2565,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.10", + "getrandom", "redox_syscall 0.2.16", "thiserror", ] @@ -2603,6 +2602,12 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + [[package]] name = "remove_dir_all" version = "0.8.2" @@ -2645,7 +2650,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -2686,15 +2691,15 @@ checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" dependencies = [ "byteorder", "const-oid", - "digest 0.10.7", + "digest", "num-bigint-dig", "num-integer", "num-iter", "num-traits", "pkcs1", "pkcs8", - "rand_core 0.6.4", - "signature 2.1.0", + "rand_core", + "signature", "spki", "subtle", "zeroize", @@ -2736,6 +2741,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.37.22" @@ -2829,6 +2843,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + [[package]] name = "sequoia-autocrypt" version = "0.25.1" @@ -2887,11 +2907,12 @@ dependencies = [ [[package]] name = "sequoia-openpgp" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30efff3f9930e85b4284e76bbdad741f36412dfb1e370efd0de5866ae1a11dfc" +checksum = "2ea026cf8a70d331c742e3ad7e68fd405d0743ff86630fb4334a1bf8d0e194c7" dependencies = [ "aes", + "aes-gcm", "anyhow", "base64 0.21.2", "block-padding", @@ -2899,12 +2920,14 @@ dependencies = [ "botan", "buffered-reader", "bzip2", + "camellia", "cast5", "cfb-mode", "chrono", "cipher", "des", - "digest 0.10.7", + "digest", + "dsa", "dyn-clone", "eax", "ecb", @@ -2912,10 +2935,9 @@ dependencies = [ "ed25519", "ed25519-dalek", "flate2", - "generic-array", - "getrandom 0.2.10", + "getrandom", "idea", - "idna 0.3.0", + "idna 0.4.0", "lalrpop", "lalrpop-util", "lazy_static", @@ -2928,22 +2950,20 @@ dependencies = [ "openssl", "openssl-sys", "p256", - "rand 0.7.3", - "rand 0.8.5", - "rand_core 0.6.4", + "rand", + "rand_core", "regex", - "regex-syntax 0.6.29", + "regex-syntax 0.8.2", "ripemd", "rsa", - "sha-1", - "sha1collisiondetection", - "sha2 0.10.7", + "sha1collisiondetection 0.3.2", + "sha2", "thiserror", "twofish", "typenum", "win-crypto-ng", "winapi", - "x25519-dalek-ng", + "x25519-dalek", "xxhash-rust", ] @@ -3049,7 +3069,7 @@ checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -3088,38 +3108,24 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha1collisiondetection" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b20793cf8330b2c7da4c438116660fed24e380bcb8a1bcfff2581b5593a0b38e" dependencies = [ - "digest 0.9.0", "generic-array", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "sha1collisiondetection" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "31c0b86a052106b16741199985c9ec2bf501f619f70c48fa479b44b093ad9a68" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "const-oid", + "digest", + "generic-array", ] [[package]] @@ -3130,7 +3136,7 @@ checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -3154,20 +3160,14 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", + "digest", + "rand_core", ] [[package]] @@ -3357,7 +3357,7 @@ dependencies = [ "fehler", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -3366,12 +3366,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "subtle-ng" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" - [[package]] name = "syn" version = "1.0.109" @@ -3385,9 +3379,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.23" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -3415,7 +3409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a74be8531b1a9d607004a32b8f50dd8093b09ec6b0a6af004e33051068e87af6" dependencies = [ "libc", - "rand 0.8.5", + "rand", "tempfile", ] @@ -3431,7 +3425,7 @@ dependencies = [ "percent-encoding", "pest", "pest_derive", - "rand 0.8.5", + "rand", "regex", "serde", "serde_json", @@ -3504,7 +3498,7 @@ checksum = "d14928354b01c4d6a4f0e549069adef399a284e7995c7ccca94e8a07a5346c59" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -3604,7 +3598,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -3666,7 +3660,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] [[package]] @@ -3720,7 +3714,7 @@ dependencies = [ "futures-util", "lazy_static", "radix_trie", - "rand 0.8.5", + "rand", "thiserror", "time 0.3.20", "tokio", @@ -3745,7 +3739,7 @@ dependencies = [ "ipnet", "lazy_static", "openssl", - "rand 0.8.5", + "rand", "smallvec", "thiserror", "tinyvec", @@ -3909,6 +3903,16 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + [[package]] name = "unsafe-libyaml" version = "0.2.8" @@ -3978,12 +3982,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" @@ -4017,7 +4015,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", "wasm-bindgen-shared", ] @@ -4039,7 +4037,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4058,13 +4056,13 @@ checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" [[package]] name = "win-crypto-ng" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aea60789d46dc8aa7d41758143c1b7dc2d6101a421712f88716a9646da2a4e39" +checksum = "99abfb435a71e54ab2971d8d8c32f1a7e006cdbf527f71743b1d45b93517bb92" dependencies = [ "cipher", "doc-comment", - "rand_core 0.5.1", + "rand_core", "winapi", "zeroize", ] @@ -4252,14 +4250,13 @@ dependencies = [ ] [[package]] -name = "x25519-dalek-ng" -version = "1.1.1" +name = "x25519-dalek" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7074de8999662970c3c4c8f7f30925028dd8f4ca31ad4c055efa9cdf2ec326" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek-ng", - "rand 0.8.5", - "rand_core 0.6.4", + "curve25519-dalek", + "rand_core", "zeroize", ] @@ -4301,5 +4298,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.39", ] diff --git a/Cargo.toml b/Cargo.toml index 9215ad96..ad622cdd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ maintenance = { status = "actively-developed" } buffered-reader = { version = "1.0.0", default-features = false, features = ["compression-deflate"] } dirs = "5" dot-writer = { version = "0.1.3", optional = true } -sequoia-openpgp = { version = "1.13", default-features = false, features = ["compression-deflate"] } +sequoia-openpgp = { version = "1.17", default-features = false, features = ["compression-deflate"] } sequoia-autocrypt = { version = "0.25", default-features = false, optional = true } sequoia-net = { version = "0.27", default-features = false } sequoia-policy-config = "0.6" @@ -64,7 +64,7 @@ clap_complete = "4" # For an MSRV of 1.63: 0.2.6 clap_mangen = "0.2" chrono = "0.4.10" -sequoia-openpgp = { version = "1.13", default-features = false } +sequoia-openpgp = { version = "1.17", default-features = false } sequoia-net = { version = "0.27", default-features = false } subplot-build = { version = "0.7.0", optional = true } cfg-if = "1" diff --git a/src/commands/armor.rs b/src/commands/armor.rs index 48ff5690..ada1c864 100644 --- a/src/commands/armor.rs +++ b/src/commands/armor.rs @@ -26,7 +26,7 @@ fn detect_armor_kind( input: Box>, ) -> (Box>, armor::Kind) { let mut dup = - Limitor::new(Dup::new(input), ARMOR_DETECTION_LIMIT).as_boxed(); + Limitor::new(Dup::new(input), ARMOR_DETECTION_LIMIT).into_boxed(); let kind = match PacketParser::from_reader(&mut dup) { Ok(PacketParserResult::Some(pp)) => match pp.next() { Ok((Packet::Signature(_), _)) => armor::Kind::Signature, @@ -61,7 +61,7 @@ pub fn dispatch(config: Config, command: cli::armor::Command) (reader.data(8).is_ok(), reader.kind()) }; let mut input = - dup.as_boxed().into_inner().unwrap().into_inner().unwrap(); + dup.into_boxed().into_inner().unwrap().into_inner().unwrap(); if already_armored && (want_kind.is_none() || want_kind == have_kind) diff --git a/src/commands/decrypt.rs b/src/commands/decrypt.rs index 9e4a9800..eeb149cf 100644 --- a/src/commands/decrypt.rs +++ b/src/commands/decrypt.rs @@ -469,6 +469,7 @@ pub fn decrypt_unwrap(config: Config, io::copy(&mut pp, output)?; return Ok(()); }, + #[allow(deprecated)] Packet::MDC(ref mdc) => if ! mdc.valid() { return Err(openpgp::Error::ManipulatedMessage.into()); }, diff --git a/src/commands/encrypt.rs b/src/commands/encrypt.rs index f82ada94..16e6eba2 100644 --- a/src/commands/encrypt.rs +++ b/src/commands/encrypt.rs @@ -11,7 +11,7 @@ use openpgp::cert::amalgamation::ValidAmalgamation; use openpgp::crypto; use openpgp::policy::Policy; use openpgp::serialize::stream::Compressor; -use openpgp::serialize::stream::Encryptor; +use openpgp::serialize::stream::Encryptor2 as Encryptor; use openpgp::serialize::stream::LiteralWriter; use openpgp::serialize::stream::Message; use openpgp::serialize::stream::Recipient; diff --git a/src/commands/key/userid.rs b/src/commands/key/userid.rs index ac8f7add..95022361 100644 --- a/src/commands/key/userid.rs +++ b/src/commands/key/userid.rs @@ -339,6 +339,7 @@ fn userid_add( sb = sb.set_preferred_hash_algorithms(hash_algorithms)?; // Remove the following types of SubPacket, if they exist + #[allow(deprecated)] const REMOVE_SUBPACKETS: &[SubpacketTag] = &[ // The Signature should be exportable. // https://openpgp-wg.gitlab.io/rfc4880bis/#name-exportable-certification diff --git a/src/commands/keyring.rs b/src/commands/keyring.rs index 736d84b1..0be3d86b 100644 --- a/src/commands/keyring.rs +++ b/src/commands/keyring.rs @@ -56,21 +56,21 @@ pub fn dispatch(config: Config, c: keyring::Command) -> Result<()> { for name in &command.name { keep |= uid - .name().unwrap_or(None) - .map(|n| &n == name) + .name2().unwrap_or(None) + .map(|n| n == name) .unwrap_or(false); } for email in &command.email { keep |= uid - .email().unwrap_or(None) - .map(|n| &n == email) + .email2().unwrap_or(None) + .map(|n| n == email) .unwrap_or(false); } for domain in &command.domain { keep |= uid - .email().unwrap_or(None) + .email2().unwrap_or(None) .map(|n| n.ends_with(&format!("@{}", domain))) .unwrap_or(false); } @@ -285,7 +285,7 @@ fn split(input: &mut (dyn io::Read + Sync + Send), prefix: &str, binary: bool) // filename. let mut sink = if let Some(f) = cert.as_ref().ok() .and_then(|cert| cert.userids().next()) - .and_then(|uid| uid.email().unwrap_or(None)) + .and_then(|uid| uid.email2().unwrap_or(None).map(|e| e.to_string())) .and_then(to_filename_fragment) { let filename_email = format!("{}-{}", filename, f); diff --git a/src/commands/net.rs b/src/commands/net.rs index a968c3fd..4690b7b6 100644 --- a/src/commands/net.rs +++ b/src/commands/net.rs @@ -432,7 +432,7 @@ pub fn dispatch_keyserver(mut config: Config, c: cli::keyserver::Command) }; import_certs(&mut config, certs)?; } - } else if let Ok(Some(addr)) = UserID::from(query.as_str()).email() { + } else if let Ok(Some(addr)) = UserID::from(query.as_str()).email2() { let certs = rt.block_on(ks.search(addr)) .context("Failed to retrieve certs")?; diff --git a/src/commands/packet/dump.rs b/src/commands/packet/dump.rs index 4fc7fee4..09a7bad8 100644 --- a/src/commands/packet/dump.rs +++ b/src/commands/packet/dump.rs @@ -432,6 +432,7 @@ impl PacketDumper { Ok(()) } + #[allow(deprecated)] match p { Unknown(ref u) => { writeln!(output, "{} Tag: {}", i, u.tag())?; @@ -734,6 +735,7 @@ impl PacketDumper { Ok(()) }; + #[allow(deprecated)] match s.value() { Unknown { body, .. } => { writeln!(output, "{} {:?}{}:", i, s.tag(), diff --git a/src/commands/wot.rs b/src/commands/wot.rs index 5d7638a3..298e4764 100644 --- a/src/commands/wot.rs +++ b/src/commands/wot.rs @@ -128,8 +128,8 @@ fn authenticate( .context("email address must be valid UTF-8")?; let userid_check = UserID::from(format!("<{}>", email)); - if let Ok(Some(email_check)) = userid_check.email() { - if email != email_check { + if let Ok(Some(email_check)) = userid_check.email2() { + if &email != email_check { println!("{:?} does not appear to be an email address", email); std::process::exit(1); @@ -208,7 +208,7 @@ fn authenticate( } } - if let Ok(Some(email)) = userid.email() { + if let Ok(Some(email)) = userid.email2() { if email.to_lowercase().contains(&pattern) { return true; } @@ -374,7 +374,7 @@ fn authenticate( if let Some(userid) = userid { if let Ok(email) = std::str::from_utf8(userid.value()) { let userid_check = UserID::from(format!("<{}>", email)); - if let Ok(Some(email_check)) = userid_check.email() { + if let Ok(Some(email_check)) = userid_check.email2() { if email == email_check { eprintln!("WARNING: {} appears to be a bare \ email address. Perhaps you forgot \