Upgrade dependencies

This commit is contained in:
Michael Zhang 2021-10-28 17:30:25 -05:00
parent b5b8a23292
commit 3c51289429
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
12 changed files with 237 additions and 445 deletions

428
Cargo.lock generated
View file

@ -4,9 +4,9 @@ version = 3
[[package]]
name = "addr2line"
version = "0.15.2"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a"
checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd"
dependencies = [
"gimli",
]
@ -46,12 +46,6 @@ dependencies = [
"derive_arbitrary",
]
[[package]]
name = "arrayvec"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "async-trait"
version = "0.1.51"
@ -80,7 +74,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -91,13 +85,13 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "backtrace"
version = "0.3.59"
version = "0.3.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744"
checksum = "091bcdf2da9950f96aa522681ce805e6857f6ca8df73833d35736ab2dc78e152"
dependencies = [
"addr2line",
"cc",
"cfg-if 1.0.0",
"cfg-if",
"libc",
"miniz_oxide",
"object",
@ -116,18 +110,6 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitvec"
version = "0.19.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321"
dependencies = [
"funty",
"radium",
"tap",
"wyz",
]
[[package]]
name = "block-buffer"
version = "0.9.0"
@ -139,9 +121,9 @@ dependencies = [
[[package]]
name = "bstr"
version = "0.2.15"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d"
checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
dependencies = [
"lazy_static",
"memchr",
@ -172,12 +154,6 @@ version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd"
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cfg-if"
version = "1.0.0"
@ -187,14 +163,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
source = "git+https://github.com/chronotope/chrono?rev=fea3392034e146c041f0ad940c1fe95aee314d38#fea3392034e146c041f0ad940c1fe95aee314d38"
dependencies = [
"libc",
"num-integer",
"num-traits",
"time",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -258,7 +233,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"crossbeam-utils",
]
@ -268,7 +243,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b10ddc024425c88c2ad148c1b0fd53f4c6d38db9697c9f1588381212fa657c9"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"crossbeam-utils",
]
@ -278,33 +253,33 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"lazy_static",
]
[[package]]
name = "crossterm"
version = "0.20.0"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ebde6a9dd5e331cd6c6f48253254d117642c31653baa475e394657c59c1f7d"
checksum = "c85525306c4291d1b73ce93c8acf9c339f9b213aef6c1d85c3830cbf1c16325c"
dependencies = [
"bitflags",
"crossterm_winapi",
"libc",
"mio 0.7.14",
"mio",
"parking_lot",
"signal-hook",
"signal-hook-mio",
"winapi 0.3.9",
"winapi",
]
[[package]]
name = "crossterm_winapi"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a6966607622438301997d3dac0d2f6e9a90c68bb6bc1785ea98456ab93c0507"
checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -421,7 +396,7 @@ checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
dependencies = [
"libc",
"redox_users",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -442,10 +417,10 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"libc",
"redox_syscall",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -486,47 +461,15 @@ dependencies = [
"syn",
]
[[package]]
name = "fsevent"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6"
dependencies = [
"bitflags",
"fsevent-sys",
]
[[package]]
name = "fsevent-sys"
version = "2.0.1"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0"
checksum = "5c0e564d24da983c053beff1bb7178e237501206840a3e6bf4e267b9e8ae734a"
dependencies = [
"libc",
]
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
dependencies = [
"bitflags",
"fuchsia-zircon-sys",
]
[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]]
name = "funty"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
[[package]]
name = "futures"
version = "0.3.17"
@ -648,16 +591,16 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"libc",
"wasi",
]
[[package]]
name = "gimli"
version = "0.24.0"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7"
[[package]]
name = "h2"
@ -806,9 +749,9 @@ dependencies = [
[[package]]
name = "inotify"
version = "0.7.1"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f"
checksum = "9e5fc8f41dbaa9c8492a96c8afffda4f76896ee041d6a57606e70581b80c901f"
dependencies = [
"bitflags",
"inotify-sys",
@ -830,16 +773,7 @@ version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "iovec"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
dependencies = [
"libc",
"cfg-if",
]
[[package]]
@ -867,13 +801,23 @@ dependencies = [
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
name = "kqueue"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
checksum = "058a107a784f8be94c7d35c1300f4facced2e93d2fbe5b1452b44e905ddca4a9"
dependencies = [
"winapi 0.2.8",
"winapi-build",
"kqueue-sys",
"libc",
]
[[package]]
name = "kqueue-sys"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587"
dependencies = [
"bitflags",
"libc",
]
[[package]]
@ -882,25 +826,6 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "lexical-core"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
dependencies = [
"arrayvec",
"bitflags",
"cfg-if 1.0.0",
"ryu",
"static_assertions",
]
[[package]]
name = "libc"
version = "0.2.105"
@ -933,7 +858,7 @@ version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
]
[[package]]
@ -944,9 +869,9 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]]
name = "memchr"
version = "2.3.4"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
[[package]]
name = "minimal-lexical"
@ -964,25 +889,6 @@ dependencies = [
"autocfg",
]
[[package]]
name = "mio"
version = "0.6.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4"
dependencies = [
"cfg-if 0.1.10",
"fuchsia-zircon",
"fuchsia-zircon-sys",
"iovec",
"kernel32-sys",
"libc",
"log",
"miow 0.2.2",
"net2",
"slab",
"winapi 0.2.8",
]
[[package]]
name = "mio"
version = "0.7.14"
@ -991,33 +897,9 @@ checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
dependencies = [
"libc",
"log",
"miow 0.3.7",
"miow",
"ntapi",
"winapi 0.3.9",
]
[[package]]
name = "mio-extras"
version = "2.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
dependencies = [
"lazycell",
"log",
"mio 0.6.23",
"slab",
]
[[package]]
name = "miow"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d"
dependencies = [
"kernel32-sys",
"net2",
"winapi 0.2.8",
"ws2_32-sys",
"winapi",
]
[[package]]
@ -1026,31 +908,7 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "net2"
version = "0.2.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae"
dependencies = [
"cfg-if 0.1.10",
"libc",
"winapi 0.3.9",
]
[[package]]
name = "nom"
version = "6.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6"
dependencies = [
"bitvec",
"funty",
"lexical-core",
"memchr",
"version_check",
"winapi",
]
[[package]]
@ -1066,20 +924,20 @@ dependencies = [
[[package]]
name = "notify"
version = "4.0.17"
version = "5.0.0-pre.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257"
checksum = "245d358380e2352c2d020e8ee62baac09b3420f1f6c012a31326cfced4ad487d"
dependencies = [
"bitflags",
"crossbeam-channel",
"filetime",
"fsevent",
"fsevent-sys",
"inotify",
"kqueue",
"libc",
"mio 0.6.23",
"mio-extras",
"mio",
"walkdir",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1088,7 +946,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1122,9 +980,12 @@ dependencies = [
[[package]]
name = "object"
version = "0.24.0"
version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170"
checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
@ -1140,9 +1001,12 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "os_str_bytes"
version = "4.1.1"
version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "324abb24c96ea09b7da6aaf68fad1be6242da1042e6f433ee929c26d8fba475b"
checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799"
dependencies = [
"memchr",
]
[[package]]
name = "panorama-daemon"
@ -1162,7 +1026,7 @@ dependencies = [
"sqlx",
"stderrlog",
"tokio",
"tokio-rustls",
"tokio-rustls 0.23.0",
"toml",
"xdg",
]
@ -1182,13 +1046,13 @@ dependencies = [
"format-bytes",
"futures",
"log",
"nom 6.2.1",
"nom",
"panorama-proto-common",
"stderrlog",
"tokio",
"tokio-rustls",
"tokio-rustls 0.23.0",
"tokio-util",
"webpki-roots",
"webpki-roots 0.22.1",
]
[[package]]
@ -1201,7 +1065,7 @@ dependencies = [
"bytes",
"format-bytes",
"log",
"nom 6.2.1",
"nom",
"num-traits",
]
@ -1209,7 +1073,7 @@ dependencies = [
name = "panorama-smtp"
version = "0.0.1"
dependencies = [
"nom 6.2.1",
"nom",
"panorama-proto-common",
]
@ -1237,12 +1101,12 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"instant",
"libc",
"redox_syscall",
"smallvec",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1323,12 +1187,6 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "radium"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8"
[[package]]
name = "redox_syscall"
version = "0.2.10"
@ -1366,7 +1224,7 @@ dependencies = [
"spin",
"untrusted",
"web-sys",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1384,8 +1242,20 @@ dependencies = [
"base64",
"log",
"ring",
"sct",
"webpki",
"sct 0.6.1",
"webpki 0.21.4",
]
[[package]]
name = "rustls"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b5ac6078ca424dc1d3ae2328526a76787fecc7f8011f520e3276730e711fc95"
dependencies = [
"log",
"ring",
"sct 0.7.0",
"webpki 0.22.0",
]
[[package]]
@ -1419,6 +1289,16 @@ dependencies = [
"untrusted",
]
[[package]]
name = "sct"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "serde"
version = "1.0.130"
@ -1458,7 +1338,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa"
dependencies = [
"block-buffer",
"cfg-if 1.0.0",
"cfg-if",
"cpufeatures",
"digest",
"opaque-debug",
@ -1481,7 +1361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29fd5867f1c4f2c5be079aee7a2adf1152ebb04a4bc4d341f504b7dece607ed4"
dependencies = [
"libc",
"mio 0.7.14",
"mio",
"signal-hook",
]
@ -1519,7 +1399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4"
dependencies = [
"itertools",
"nom 7.0.0",
"nom",
"unicode_categories",
]
@ -1565,7 +1445,7 @@ dependencies = [
"once_cell",
"parking_lot",
"percent-encoding",
"rustls",
"rustls 0.19.1",
"serde",
"serde_json",
"sha2",
@ -1576,8 +1456,8 @@ dependencies = [
"thiserror",
"tokio-stream",
"url",
"webpki",
"webpki-roots",
"webpki 0.21.4",
"webpki-roots 0.21.1",
"whoami",
]
@ -1609,15 +1489,9 @@ checksum = "0d1bd069de53442e7a320f525a6d4deb8bb0621ac7a55f7eccbc2b58b57f43d0"
dependencies = [
"once_cell",
"tokio",
"tokio-rustls",
"tokio-rustls 0.22.0",
]
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "stderrlog"
version = "0.5.1"
@ -1658,12 +1532,6 @@ dependencies = [
"unicode-xid",
]
[[package]]
name = "tap"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "termcolor"
version = "1.1.2"
@ -1719,7 +1587,7 @@ checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
dependencies = [
"libc",
"wasi",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1747,14 +1615,14 @@ dependencies = [
"bytes",
"libc",
"memchr",
"mio 0.7.14",
"mio",
"num_cpus",
"once_cell",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"tokio-macros",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1774,9 +1642,20 @@ version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls",
"rustls 0.19.1",
"tokio",
"webpki",
"webpki 0.21.4",
]
[[package]]
name = "tokio-rustls"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d49194a46b06a69f2498a34a595ab4a9c1babd2642ffa3dbccf6c6778d1426f2"
dependencies = [
"rustls 0.20.0",
"tokio",
"webpki 0.22.0",
]
[[package]]
@ -1825,7 +1704,7 @@ version = "0.1.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"pin-project-lite",
"tracing-core",
]
@ -1936,7 +1815,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
dependencies = [
"same-file",
"winapi 0.3.9",
"winapi",
"winapi-util",
]
@ -1962,7 +1841,7 @@ version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"wasm-bindgen-macro",
]
@ -2030,13 +1909,32 @@ dependencies = [
"untrusted",
]
[[package]]
name = "webpki"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "webpki-roots"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940"
dependencies = [
"webpki",
"webpki 0.21.4",
]
[[package]]
name = "webpki-roots"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c475786c6f47219345717a043a37ec04cb4bc185e28853adcc4fa0a947eba630"
dependencies = [
"webpki 0.22.0",
]
[[package]]
@ -2049,12 +1947,6 @@ dependencies = [
"web-sys",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
[[package]]
name = "winapi"
version = "0.3.9"
@ -2065,12 +1957,6 @@ dependencies = [
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
@ -2083,7 +1969,7 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2092,22 +1978,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "ws2_32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
dependencies = [
"winapi 0.2.8",
"winapi-build",
]
[[package]]
name = "wyz"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
[[package]]
name = "xdg"
version = "2.4.0"

View file

@ -2,29 +2,30 @@
name = "panorama-daemon"
version = "0.0.1"
edition = "2018"
license = "GPL-3.0-or-later"
[features]
default = ["config-watch"]
config-watch = ["notify"]
[dependencies]
anyhow = { version = "1.0.42", features = ["backtrace"] }
async-trait = "0.1.50"
clap = "3.0.0-beta.2"
anyhow = { version = "1.0.44", features = ["backtrace"] }
async-trait = "0.1.51"
clap = "3.0.0-beta.5"
derivative = "2.2.0"
futures = "0.3.16"
hyper = { version = "0.14.11", features = ["server", "http2", "stream"] }
futures = "0.3.17"
hyper = { version = "0.14.14", features = ["server", "http2", "stream"] }
log = "0.4.14"
panorama-imap = { path = "../imap" }
panorama-smtp = { path = "../smtp" }
serde = { version = "1.0.126", features = ["derive"] }
serde = { version = "1.0.130", features = ["derive"] }
stderrlog = "0.5.1"
tokio = { version = "1.9.0", features = ["full"] }
tokio-rustls = "0.22.0"
tokio = { version = "1.12.0", features = ["full"] }
tokio-rustls = "0.23.0"
toml = "0.5.8"
xdg = "2.2.0"
xdg = "2.4.0"
notify = { version = "4.0.17", optional = true }
notify = { version = "5.0.0-pre.13", optional = true }
[dependencies.sqlx]
version = "0.5.9"

View file

@ -1,12 +1,12 @@
use std::fs;
use std::path::Path;
use std::sync::mpsc as stdmpsc;
use std::time::Duration;
use anyhow::{Context, Result};
use futures::future::TryFutureExt;
use notify::{
watcher, DebouncedEvent, RecommendedWatcher, RecursiveMode, Watcher,
recommended_watcher, Event as NotifyEvent, RecommendedWatcher,
RecursiveMode, Watcher,
};
use tokio::{sync::watch, task::JoinHandle};
use xdg::BaseDirectories;
@ -21,7 +21,12 @@ pub type ConfigWatcher = watch::Receiver<Config>;
pub fn spawn_config_watcher_system() -> Result<(JoinHandle<()>, ConfigWatcher)>
{
let (tx, rx) = stdmpsc::channel();
let mut dir_watcher = watcher(tx, Duration::from_secs(10))?;
let mut dir_watcher = recommended_watcher(move |res| match res {
Ok(event) => {
tx.send(event).unwrap();
}
Err(_) => {}
})?;
let xdg = BaseDirectories::new()?;
let config_home = xdg.get_config_home().join("panorama");
@ -44,7 +49,7 @@ pub fn spawn_config_watcher_system() -> Result<(JoinHandle<()>, ConfigWatcher)>
async fn start_notify_stream(
_watcher: RecommendedWatcher,
rx: stdmpsc::Receiver<DebouncedEvent>,
rx: stdmpsc::Receiver<NotifyEvent>,
config_home: impl AsRef<Path>,
config_tx: watch::Sender<Config>,
) -> Result<()> {
@ -59,36 +64,42 @@ async fn start_notify_stream(
debug!("listening for inotify events");
loop {
use notify::EventKind;
let event = rx.recv()?;
debug!("notify event: {:?}", event);
match event {
DebouncedEvent::NoticeRemove(_)
| DebouncedEvent::NoticeWrite(_) => {
// TODO: should this be handled somehow?
// neovim sends these since it's writing to a temp buffer
}
DebouncedEvent::Create(path) | DebouncedEvent::Write(path) => {
let path_c = config_home
match event.kind {
EventKind::Create(_) | EventKind::Modify(_) => {
let path_expect = config_home
.clone()
.join(path.clone())
.join("panorama.toml")
.canonicalize()
.context("osu")?;
if !path_c.exists() {
debug!("path {:?} doesn't exist", path_c);
if !path_expect.exists() {
debug!("path {:?} doesn't exist", path_expect);
continue;
}
match event.paths.iter().find(|p| *p == &path_expect) {
Some(path) => path.to_path_buf(),
None => continue,
};
// TODO: any better way to do this?
let config_path_c =
config_path.canonicalize().context("cfg_path")?;
if config_path_c != path_c {
debug!("did not match {:?} {:?}", config_path_c, path_c);
if config_path_c != path_expect {
debug!(
"did not match {:?} {:?}",
config_path_c, path_expect
);
continue;
}
debug!("reading config from {:?}", path_c);
let config = Config::from_file(path_c).await.context("read")?;
debug!("reading config from {:?}", path_expect);
let config =
Config::from_file(path_expect).await.context("read")?;
// debug!("sending config {:?}", config);
config_tx.send(config)?;
}

View file

@ -4,7 +4,7 @@ extern crate log;
extern crate futures;
use anyhow::{Context, Result};
use clap::Clap;
use clap::Parser;
use futures::future::FutureExt;
use panorama_daemon::{
config::{Config, MailAccountConfig},
@ -20,7 +20,7 @@ type ExitListener = oneshot::Receiver<()>;
/// The panorama daemon runs in the background and communicates with other
/// panorama components over Unix sockets.
#[derive(Debug, Clap)]
#[derive(Debug, Parser)]
struct Options {
// /// Config file path (defaults to XDG)
// #[clap(long = "config", short = 'c')]

View file

@ -12,6 +12,7 @@ notice = "warn"
[licenses]
unlicensed = "deny"
default = "deny"
copyleft = "allow"
allow-osi-fsf-free = "either"

View file

@ -22,23 +22,23 @@ rfc6154 = [] # list
fuzzing = ["arbitrary", "panorama-proto-common/fuzzing"]
[dependencies]
anyhow = { version = "1.0.42", features = ["backtrace"] }
anyhow = { version = "1.0.44", features = ["backtrace"] }
async-trait = "0.1.51"
bitflags = "1.2.1"
bytes = "1.0.1"
bitflags = "1.3.2"
bytes = "1.1.0"
chrono = "0.4.19"
derivative = "2.2.0"
derive_builder = "0.10.2"
format-bytes = "0.2.2"
futures = "0.3.16"
futures = "0.3.17"
log = "0.4.14"
nom = "6.2.1"
nom = "7.0.0"
stderrlog = { version = "0.5.1", optional = true }
tokio = { version = "1.9.0", features = ["full"] }
tokio-rustls = { version = "0.22.0", features = ["dangerous_configuration"] }
tokio-util = { version = "0.6.7", features = ["codec"] }
webpki-roots = "0.21.1"
tokio = { version = "1.12.0", features = ["full"] }
tokio-rustls = { version = "0.23.0", features = ["dangerous_configuration"] }
tokio-util = { version = "0.6.8", features = ["codec"] }
webpki-roots = "0.22.1"
panorama-proto-common = { path = "../proto-common" }
# for fuzzing
arbitrary = { version = "1", optional = true, features = ["derive"] }
arbitrary = { version = "1.0.2", optional = true, features = ["derive"] }

View file

@ -1,107 +0,0 @@
//! Configurable cert verifier for rustls, can disable hostname verification,
//! etc.
//!
//! Based closely on <https://github.com/rustls/rustls/blob/v/0.19.0/rustls/src/verify.rs#L253>
use tokio_rustls::{
rustls::{
Certificate, OwnedTrustAnchor, RootCertStore, ServerCertVerified,
ServerCertVerifier, TLSError,
},
webpki::{
self, DNSNameRef, EndEntityCert, SignatureAlgorithm,
TLSServerTrustAnchors, TrustAnchor,
},
};
type SignatureAlgorithms = &'static [&'static SignatureAlgorithm];
static SUPPORTED_SIG_ALGS: SignatureAlgorithms = &[
&webpki::ECDSA_P256_SHA256,
&webpki::ECDSA_P256_SHA384,
&webpki::ECDSA_P384_SHA256,
&webpki::ECDSA_P384_SHA384,
&webpki::ED25519,
&webpki::RSA_PSS_2048_8192_SHA256_LEGACY_KEY,
&webpki::RSA_PSS_2048_8192_SHA384_LEGACY_KEY,
&webpki::RSA_PSS_2048_8192_SHA512_LEGACY_KEY,
&webpki::RSA_PKCS1_2048_8192_SHA256,
&webpki::RSA_PKCS1_2048_8192_SHA384,
&webpki::RSA_PKCS1_2048_8192_SHA512,
&webpki::RSA_PKCS1_3072_8192_SHA384,
];
fn try_now() -> Result<webpki::Time, TLSError> {
webpki::Time::try_from(std::time::SystemTime::now())
.map_err(|_| TLSError::FailedToGetCurrentTime)
}
#[derive(Builder)]
pub struct ConfigurableCertVerifier {
#[builder(default = "true")]
pub verify_hostname: bool,
#[builder(default = "try_now")]
pub time: fn() -> Result<webpki::Time, TLSError>,
// TODO: add custom signaturue algorithms?
}
impl ServerCertVerifier for ConfigurableCertVerifier {
fn verify_server_cert(
&self,
roots: &RootCertStore,
presented_certs: &[Certificate],
dns_name: DNSNameRef<'_>,
ocsp_response: &[u8],
) -> Result<ServerCertVerified, TLSError> {
let (cert, chain, trustroots) = prepare(roots, presented_certs)?;
let now = (self.time)()?;
let cert = cert
.verify_is_valid_tls_server_cert(
SUPPORTED_SIG_ALGS,
&TLSServerTrustAnchors(&trustroots),
&chain,
now,
)
.map_err(TLSError::WebPKIError)
.map(|_| cert)?;
if !ocsp_response.is_empty() {
trace!("Unvalidated OCSP response: {:?}", ocsp_response.to_vec());
}
cert.verify_is_valid_for_dns_name(dns_name)
.map_err(TLSError::WebPKIError)
.map(|_| ServerCertVerified::assertion())
}
}
type CertChainAndRoots<'a, 'b> =
(EndEntityCert<'a>, Vec<&'a [u8]>, Vec<TrustAnchor<'b>>);
fn prepare<'a, 'b>(
roots: &'b RootCertStore,
presented_certs: &'a [Certificate],
) -> Result<CertChainAndRoots<'a, 'b>, TLSError> {
if presented_certs.is_empty() {
return Err(TLSError::NoCertificatesPresented);
}
// EE cert must appear first.
let cert = EndEntityCert::from(&presented_certs[0].0)
.map_err(TLSError::WebPKIError)?;
let chain: Vec<&'a [u8]> = presented_certs
.iter()
.skip(1)
.map(|cert| cert.0.as_ref())
.collect();
let trustroots: Vec<TrustAnchor> = roots
.roots
.iter()
.map(OwnedTrustAnchor::to_trust_anchor)
.collect();
Ok((cert, chain, trustroots))
}

View file

@ -16,7 +16,6 @@
mod macros;
pub mod auth;
pub mod configurable_cert_verifier;
pub mod response_stream;
mod client;

View file

@ -1,10 +1,14 @@
use std::sync::Arc;
use std::{convert::TryFrom, sync::Arc};
use anyhow::Result;
use tokio::io::{AsyncRead, AsyncWrite};
use tokio_rustls::{
client::TlsStream, rustls::ClientConfig as RustlsConfig,
webpki::DNSNameRef, TlsConnector,
client::TlsStream,
rustls::{
ClientConfig as RustlsConfig, OwnedTrustAnchor, RootCertStore,
ServerName,
},
TlsConnector,
};
/// Wraps the given async stream in TLS with the given hostname (required)
@ -17,13 +21,25 @@ where
{
let server_name = hostname.as_ref();
let mut tls_config = RustlsConfig::new();
tls_config
.root_store
.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);
let mut root_store = RootCertStore::empty();
root_store.add_server_trust_anchors(
webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|ta| {
OwnedTrustAnchor::from_subject_spki_name_constraints(
ta.subject,
ta.spki,
ta.name_constraints,
)
}),
);
let tls_config = RustlsConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_store)
.with_no_client_auth();
let tls_config = TlsConnector::from(Arc::new(tls_config));
let dnsname = DNSNameRef::try_from_ascii_str(server_name).unwrap();
let stream = tls_config.connect(dnsname, c).await?;
let server_name = ServerName::try_from(server_name).unwrap();
let stream = tls_config.connect(server_name, c).await?;
Ok(stream)
}

View file

@ -13,13 +13,13 @@ default = []
fuzzing = ["arbitrary"]
[dependencies]
anyhow = { version = "1.0.42", features = ["backtrace"] }
bstr = "0.2.15"
bytes = "1.0.1"
anyhow = { version = "1.0.44", features = ["backtrace"] }
bstr = "0.2.17"
bytes = "1.1.0"
format-bytes = "0.2.2"
log = "0.4.14"
nom = "6.2.1"
nom = "7.0.0"
# for fuzzing
arbitrary = { version = "1", optional = true, features = ["derive"] }
arbitrary = { version = "1.0.2", optional = true, features = ["derive"] }
num-traits = "0.2.14"

View file

@ -13,5 +13,5 @@ readme = "README.md"
workspace = ".."
[dependencies]
nom = "6.2.1"
nom = "7.0.0"
panorama-proto-common = { path = "../proto-common" }

View file

@ -2,6 +2,7 @@
name = "panorama-tui"
version = "0.1.0"
edition = "2018"
license = "GPL-3.0-or-later"
[dependencies]
crossterm = "0.20"
crossterm = "0.22.1"