diff --git a/Cargo.lock b/Cargo.lock index 0bb59bc..eed3755 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,7 +58,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom", "once_cell", "version_check", ] @@ -70,7 +70,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.12", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -552,12 +552,6 @@ dependencies = [ "shlex", ] -[[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" @@ -990,7 +984,7 @@ dependencies = [ "hkdf", "hmac", "percent-encoding", - "rand 0.8.5", + "rand", "sha2", "subtle", "time", @@ -1077,7 +1071,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1089,7 +1083,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "typenum", ] @@ -1104,16 +1098,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest", "fiat-crypto", - "platforms", "rustc_version", "subtle", "zeroize", @@ -1345,7 +1338,7 @@ checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core 0.6.4", + "rand_core", "serde", "sha2", "zeroize", @@ -1372,9 +1365,10 @@ dependencies = [ "ff", "generic-array", "group", + "hkdf", "pem-rfc7468", "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", @@ -1491,15 +1485,15 @@ 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.1.20" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" @@ -1777,17 +1771,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.12" @@ -1797,7 +1780,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -1842,7 +1825,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2579,7 +2562,7 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -2624,7 +2607,7 @@ dependencies = [ "lexical", "num-bigint", "num-traits", - "rand 0.8.5", + "rand", "regex", "rust_decimal", "saturating", @@ -2715,7 +2698,7 @@ dependencies = [ "autocfg", "num-integer", "num-traits", - "rand 0.8.5", + "rand", ] [[package]] @@ -2730,7 +2713,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand 0.8.5", + "rand", "smallvec", "zeroize", ] @@ -2798,9 +2781,9 @@ checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" dependencies = [ "base64 0.13.1", "chrono", - "getrandom 0.2.12", + "getrandom", "http", - "rand 0.8.5", + "rand", "reqwest", "serde", "serde_json", @@ -2844,7 +2827,7 @@ dependencies = [ "log", "num-bigint", "oauth2", - "rand 0.8.5", + "rand", "ring 0.16.20", "serde", "serde-value", @@ -2890,15 +2873,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.2.3+3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.101" @@ -2907,7 +2881,6 @@ checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -2984,6 +2957,18 @@ dependencies = [ "sha2", ] +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "p521" version = "0.13.3" @@ -2994,7 +2979,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "rand_core 0.6.4", + "rand_core", "sha2", ] @@ -3046,7 +3031,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1a5d4e9c205d2c1ae73b84aab6240e98218c0e72e63b50422cfb2d1ca952282" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3057,7 +3042,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3092,6 +3077,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest", + "hmac", ] [[package]] @@ -3196,6 +3182,21 @@ dependencies = [ "spki", ] +[[package]] +name = "pkcs5" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e847e2c91a18bfa887dd028ec33f2fe6f25db77db3619024764914affe8b69a6" +dependencies = [ + "aes", + "cbc", + "der", + "pbkdf2 0.12.2", + "scrypt", + "sha2", + "spki", +] + [[package]] name = "pkcs8" version = "0.10.2" @@ -3203,6 +3204,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", + "pkcs5", + "rand_core", "spki", ] @@ -3212,12 +3215,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - [[package]] name = "poem" version = "1.3.59" @@ -3246,7 +3243,7 @@ dependencies = [ "poem-derive", "priority-queue", "quick-xml 0.30.0", - "rand 0.8.5", + "rand", "regex", "rfc7239", "rust-embed", @@ -3549,19 +3546,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[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" @@ -3569,18 +3553,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]] @@ -3590,16 +3564,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]] @@ -3608,16 +3573,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", -] - -[[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]] @@ -3648,7 +3604,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.12", + "getrandom", "libredox", "thiserror", ] @@ -3795,7 +3751,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.12", + "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3844,7 +3800,8 @@ dependencies = [ "num-traits", "pkcs1", "pkcs8", - "rand_core 0.6.4", + "rand_core", + "sha2", "signature", "spki", "subtle", @@ -3853,19 +3810,21 @@ dependencies = [ [[package]] name = "russh" -version = "0.43.0" +version = "0.44.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9534703dc13be1eefc5708618f4c346da8e4f04f260218613f351ed5e94259" +checksum = "bbf12ff475b648c945e4ab411a0d653822cf3a9ac461078e753b9aaaf9ffeab4" dependencies = [ "aes", "aes-gcm", "async-trait", "bitflags 2.5.0", "byteorder", + "cbc", "chacha20", "ctr", "curve25519-dalek", "digest", + "elliptic-curve", "flate2", "futures", "generic-array", @@ -3874,17 +3833,21 @@ dependencies = [ "log", "num-bigint", "once_cell", - "openssl", + "p256", + "p384", + "p521", "poly1305", - "rand 0.8.5", + "rand", + "rand_core", "russh-cryptovec", "russh-keys", "sha1", "sha2", + "ssh-encoding", + "ssh-key", "subtle", "thiserror", "tokio", - "tokio-util", ] [[package]] @@ -3899,42 +3862,53 @@ dependencies = [ [[package]] name = "russh-keys" -version = "0.43.0" +version = "0.44.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4a5afa2fab6fd49d0c470a3b75c3c70a4f363c38db32df5ae3b44a3abf5ab9" +checksum = "dedf73f1fc2e9fb4fe0628fa37a641ef9b333d74ad7c0fdaf2b6917da34e5f3b" dependencies = [ "aes", "async-trait", "bcrypt-pbkdf", - "bit-vec", "block-padding", "byteorder", "cbc", "ctr", "data-encoding", + "der", + "digest", "dirs", + "ecdsa", "ed25519-dalek", + "elliptic-curve", "futures", "hmac", "inout", "log", "md5", - "num-bigint", "num-integer", - "openssl", "p256", + "p384", "p521", "pbkdf2 0.11.0", - "rand 0.7.3", - "rand_core 0.6.4", + "pkcs1", + "pkcs5", + "pkcs8", + "rand", + "rand_core", + "rsa", "russh-cryptovec", + "sec1", "serde", "sha1", "sha2", + "spki", + "ssh-encoding", + "ssh-key", "thiserror", "tokio", "tokio-stream", - "yasna", + "typenum", + "zeroize", ] [[package]] @@ -3981,7 +3955,7 @@ dependencies = [ "borsh", "bytes", "num-traits", - "rand 0.8.5", + "rand", "rkyv", "serde", "serde_json", @@ -4102,6 +4076,15 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + [[package]] name = "same-file" version = "1.0.6" @@ -4132,6 +4115,17 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "pbkdf2 0.12.2", + "salsa20", + "sha2", +] + [[package]] name = "sct" version = "0.7.1" @@ -4537,7 +4531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -4759,7 +4753,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rand 0.8.5", + "rand", "rsa", "serde", "sha1", @@ -4800,7 +4794,7 @@ dependencies = [ "md-5", "memchr", "once_cell", - "rand 0.8.5", + "rand", "serde", "serde_json", "sha2", @@ -4838,6 +4832,57 @@ dependencies = [ "uuid", ] +[[package]] +name = "ssh-cipher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caac132742f0d33c3af65bfcde7f6aa8f62f0e991d80db99149eb9d44708784f" +dependencies = [ + "aes", + "aes-gcm", + "cbc", + "chacha20", + "cipher", + "ctr", + "poly1305", + "ssh-encoding", + "subtle", +] + +[[package]] +name = "ssh-encoding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb9242b9ef4108a78e8cd1a2c98e193ef372437f8c22be363075233321dd4a15" +dependencies = [ + "base64ct", + "pem-rfc7468", + "sha2", +] + +[[package]] +name = "ssh-key" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca9b366a80cf18bb6406f4cf4d10aebfb46140a8c0c33f666a144c5c76ecbafc" +dependencies = [ + "bcrypt-pbkdf", + "ed25519-dalek", + "num-bigint-dig", + "p256", + "p384", + "p521", + "rand_core", + "rsa", + "sec1", + "sha2", + "signature", + "ssh-cipher", + "ssh-encoding", + "subtle", + "zeroize", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -5015,9 +5060,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -5038,9 +5083,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -5267,7 +5312,7 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand 0.8.5", + "rand", "slab", "tokio", "tokio-util", @@ -5369,7 +5414,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "rustls 0.20.9", "sha-1", "thiserror", @@ -5390,7 +5435,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha1", "thiserror", "url", @@ -5524,7 +5569,7 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ - "getrandom 0.2.12", + "getrandom", "serde", ] @@ -5659,9 +5704,9 @@ dependencies = [ "password-hash 0.4.2", "poem", "poem-openapi", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand", + "rand_chacha", + "rand_core", "rustls 0.20.9", "rustls-pemfile", "sea-orm", @@ -5695,9 +5740,9 @@ dependencies = [ "password-hash 0.4.2", "poem", "poem-openapi", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand", + "rand_chacha", + "rand_core", "rustls 0.20.9", "rustls-pemfile", "sea-orm", @@ -5799,7 +5844,7 @@ dependencies = [ "mysql_common", "once_cell", "password-hash 0.2.1", - "rand 0.8.5", + "rand", "rustls 0.20.9", "rustls-native-certs", "rustls-pemfile", @@ -5870,12 +5915,6 @@ dependencies = [ "thiserror", ] -[[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.11.0+wasi-snapshot-preview1" @@ -6290,8 +6329,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "bit-vec", - "num-bigint", "time", ] diff --git a/rust-toolchain b/rust-toolchain index 97764b3..b6de8df 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-02-04 +nightly-2024-07-09 diff --git a/warpgate-admin/Cargo.toml b/warpgate-admin/Cargo.toml index e7a9a21..f402adc 100644 --- a/warpgate-admin/Cargo.toml +++ b/warpgate-admin/Cargo.toml @@ -8,10 +8,10 @@ version = "0.9.1" anyhow = { version = "1.0", features = ["std"] } async-trait = "0.1" bytes = "1.3" -chrono = { version = "0.4", default_features = false } +chrono = { version = "0.4", default-features = false } futures = "0.3" hex = "0.4" -mime_guess = { version = "2.0", default_features = false } +mime_guess = { version = "2.0", default-features = false } poem = { version = "1.3.50", features = [ "cookie", "session", diff --git a/warpgate-common/Cargo.toml b/warpgate-common/Cargo.toml index cf282a9..43785ce 100644 --- a/warpgate-common/Cargo.toml +++ b/warpgate-common/Cargo.toml @@ -9,7 +9,7 @@ anyhow = "1.0" argon2 = "0.4" async-trait = "0.1" bytes = "1.3" -chrono = { version = "0.4", default_features = false, features = ["serde"] } +chrono = { version = "0.4", default-features = false, features = ["serde"] } data-encoding = "2.3" delegate = "0.6" humantime-serde = "1.1" diff --git a/warpgate-core/Cargo.toml b/warpgate-core/Cargo.toml index cf4cb4e..64af0c5 100644 --- a/warpgate-core/Cargo.toml +++ b/warpgate-core/Cargo.toml @@ -13,7 +13,7 @@ anyhow = "1.0" argon2 = "0.4" async-trait = "0.1" bytes = "1.3" -chrono = { version = "0.4", default_features = false, features = ["serde"] } +chrono = { version = "0.4", default-features = false, features = ["serde"] } data-encoding = "2.3" humantime-serde = "1.1" futures = "0.3" diff --git a/warpgate-database-protocols/src/error.rs b/warpgate-database-protocols/src/error.rs index c407e76..1bde10e 100644 --- a/warpgate-database-protocols/src/error.rs +++ b/warpgate-database-protocols/src/error.rs @@ -94,10 +94,6 @@ pub enum Error { /// A background worker has crashed. #[error("attempted to communicate with a crashed background worker")] WorkerCrashed, - - #[cfg(feature = "migrate")] - #[error("{0}")] - Migrate(#[source] Box), } impl StdError for Box {} @@ -180,22 +176,6 @@ where } } -#[cfg(feature = "migrate")] -impl From for Error { - #[inline] - fn from(error: crate::migrate::MigrateError) -> Self { - Error::Migrate(Box::new(error)) - } -} - -#[cfg(feature = "_tls-native-tls")] -impl From for Error { - #[inline] - fn from(error: sqlx_rt::native_tls::Error) -> Self { - Error::Tls(Box::new(error)) - } -} - // Format an error message as a `Protocol` error #[macro_export] macro_rules! err_protocol { diff --git a/warpgate-database-protocols/src/mysql/protocol/text/column.rs b/warpgate-database-protocols/src/mysql/protocol/text/column.rs index 36a93e3..da445f1 100644 --- a/warpgate-database-protocols/src/mysql/protocol/text/column.rs +++ b/warpgate-database-protocols/src/mysql/protocol/text/column.rs @@ -12,7 +12,6 @@ use crate::mysql::protocol::Capabilities; // https://dev.mysql.com/doc/dev/mysql-server/8.0.12/group__group__cs__column__definition__flags.html bitflags! { - #[cfg_attr(feature = "offline", derive(serde::Serialize, serde::Deserialize))] pub struct ColumnFlags: u16 { /// Field can't be `NULL`. const NOT_NULL = 1; @@ -64,7 +63,6 @@ bitflags! { // https://dev.mysql.com/doc/internals/en/com-query-response.html#column-type #[derive(Debug, Copy, Clone, PartialEq, Eq)] -#[cfg_attr(feature = "offline", derive(serde::Serialize, serde::Deserialize))] #[repr(u8)] pub enum ColumnType { Decimal = 0x00, diff --git a/warpgate-db-entities/Cargo.toml b/warpgate-db-entities/Cargo.toml index 455da6b..902225b 100644 --- a/warpgate-db-entities/Cargo.toml +++ b/warpgate-db-entities/Cargo.toml @@ -5,7 +5,7 @@ name = "warpgate-db-entities" version = "0.9.1" [dependencies] -chrono = { version = "0.4", default_features = false, features = ["serde"] } +chrono = { version = "0.4", default-features = false, features = ["serde"] } poem-openapi = { version = "2.0", features = ["chrono", "uuid"] } sea-orm = { version = "0.12.2", features = [ "macros", diff --git a/warpgate-db-migrations/Cargo.toml b/warpgate-db-migrations/Cargo.toml index 83f99b1..a3fd324 100644 --- a/warpgate-db-migrations/Cargo.toml +++ b/warpgate-db-migrations/Cargo.toml @@ -9,7 +9,7 @@ version = "0.9.1" [dependencies] async-std = { version = "^1.11", features = ["attributes"] } -chrono = { version = "0.4", default_features = false, features = ["serde"] } +chrono = { version = "0.4", default-features = false, features = ["serde"] } sea-orm = { version = "0.12.2", features = [ "runtime-tokio-native-tls", "macros", diff --git a/warpgate-protocol-http/Cargo.toml b/warpgate-protocol-http/Cargo.toml index d492471..7606a83 100644 --- a/warpgate-protocol-http/Cargo.toml +++ b/warpgate-protocol-http/Cargo.toml @@ -7,7 +7,7 @@ version = "0.9.1" [dependencies] anyhow = "1.0" async-trait = "0.1" -chrono = { version = "0.4", default_features = false, features = ["serde"] } +chrono = { version = "0.4", default-features = false, features = ["serde"] } cookie = "0.16" data-encoding = "2.3" delegate = "0.6" diff --git a/warpgate-protocol-http/src/common.rs b/warpgate-protocol-http/src/common.rs index 92df6e2..168f74a 100644 --- a/warpgate-protocol-http/src/common.rs +++ b/warpgate-protocol-http/src/common.rs @@ -21,7 +21,6 @@ static AUTH_STATE_ID_SESSION_KEY: &str = "auth_state_id"; pub static SESSION_COOKIE_NAME: &str = "warpgate-http-session"; pub trait SessionExt { - fn has_selected_target(&self) -> bool; fn get_target_name(&self) -> Option; fn set_target_name(&self, target_name: String); fn is_authenticated(&self) -> bool; @@ -33,10 +32,6 @@ pub trait SessionExt { } impl SessionExt for Session { - fn has_selected_target(&self) -> bool { - self.get_target_name().is_some() - } - fn get_target_name(&self) -> Option { self.get(TARGET_SESSION_KEY) } diff --git a/warpgate-protocol-mysql/src/client.rs b/warpgate-protocol-mysql/src/client.rs index a0978b9..1ac6682 100644 --- a/warpgate-protocol-mysql/src/client.rs +++ b/warpgate-protocol-mysql/src/client.rs @@ -19,7 +19,7 @@ use crate::tls::configure_tls_connector; pub struct MySqlClient { pub stream: MySqlStream>, - pub capabilities: Capabilities, + pub _capabilities: Capabilities, } pub struct ConnectionOptions { @@ -167,7 +167,7 @@ impl MySqlClient { Ok(Self { stream, - capabilities: options.capabilities, + _capabilities: options.capabilities, }) } } diff --git a/warpgate-protocol-ssh/src/server/mod.rs b/warpgate-protocol-ssh/src/server/mod.rs index 6f95a31..1cc9e28 100644 --- a/warpgate-protocol-ssh/src/server/mod.rs +++ b/warpgate-protocol-ssh/src/server/mod.rs @@ -71,7 +71,7 @@ pub async fn run_server(services: Services, address: SocketAddr) -> Result<()> { let (event_tx, event_rx) = unbounded_channel(); - let handler = ServerHandler { id, event_tx }; + let handler = ServerHandler { event_tx }; let session = match ServerSession::start( remote_address, diff --git a/warpgate-protocol-ssh/src/server/russh_handler.rs b/warpgate-protocol-ssh/src/server/russh_handler.rs index 3c3610f..bbba500 100644 --- a/warpgate-protocol-ssh/src/server/russh_handler.rs +++ b/warpgate-protocol-ssh/src/server/russh_handler.rs @@ -8,7 +8,7 @@ use russh_keys::key::PublicKey; use tokio::sync::mpsc::UnboundedSender; use tokio::sync::oneshot; use tracing::*; -use warpgate_common::{Secret, SessionId}; +use warpgate_common::Secret; use crate::common::{PtyRequest, ServerChannelId}; use crate::{DirectTCPIPParams, X11Request}; @@ -52,7 +52,6 @@ pub enum ServerHandlerEvent { } pub struct ServerHandler { - pub id: SessionId, pub event_tx: UnboundedSender, } diff --git a/warpgate-protocol-ssh/src/server/session.rs b/warpgate-protocol-ssh/src/server/session.rs index c619b14..c79b322 100644 --- a/warpgate-protocol-ssh/src/server/session.rs +++ b/warpgate-protocol-ssh/src/server/session.rs @@ -418,7 +418,7 @@ impl ServerSession { } } - ServerHandlerEvent::PtyRequest(server_channel_id, request, _) => { + ServerHandlerEvent::PtyRequest(server_channel_id, request, reply) => { let channel_id = self.map_channel(&server_channel_id)?; self.channel_pty_size_map .insert(channel_id, request.clone()); @@ -443,6 +443,7 @@ impl ServerSession { .channel_success(server_channel_id.0) .await; self.pty_channels.push(channel_id); + let _ = reply.send(()); } ServerHandlerEvent::ShellRequest(server_channel_id, reply) => { @@ -488,28 +489,34 @@ impl ServerSession { let _ = reply.send(self._auth_keyboard_interactive(username, response).await); } - ServerHandlerEvent::Data(channel, data, _) => { + ServerHandlerEvent::Data(channel, data, reply) => { self._data(channel, data).await?; + let _ = reply.send(()); } - ServerHandlerEvent::ExtendedData(channel, data, code, _) => { + ServerHandlerEvent::ExtendedData(channel, data, code, reply) => { self._extended_data(channel, code, data).await?; + let _ = reply.send(()); } - ServerHandlerEvent::ChannelClose(channel, _) => { + ServerHandlerEvent::ChannelClose(channel, reply) => { self._channel_close(channel).await?; + let _ = reply.send(()); } - ServerHandlerEvent::ChannelEof(channel, _) => { + ServerHandlerEvent::ChannelEof(channel, reply) => { self._channel_eof(channel).await?; + let _ = reply.send(()); } - ServerHandlerEvent::WindowChangeRequest(channel, request, _) => { + ServerHandlerEvent::WindowChangeRequest(channel, request, reply) => { self._window_change_request(channel, request).await?; + let _ = reply.send(()); } - ServerHandlerEvent::Signal(channel, signal, _) => { + ServerHandlerEvent::Signal(channel, signal, reply) => { self._channel_signal(channel, signal).await?; + let _ = reply.send(()); } ServerHandlerEvent::ExecRequest(channel, data, reply) => { @@ -521,12 +528,14 @@ impl ServerSession { let _ = reply.send(self._channel_open_direct_tcpip(channel, params).await?); } - ServerHandlerEvent::EnvRequest(channel, name, value, _) => { + ServerHandlerEvent::EnvRequest(channel, name, value, reply) => { self._channel_env_request(channel, name, value).await?; + let _ = reply.send(()); } - ServerHandlerEvent::X11Request(channel, request, _) => { + ServerHandlerEvent::X11Request(channel, request, reply) => { self._channel_x11_request(channel, request).await?; + let _ = reply.send(()); } ServerHandlerEvent::TcpIpForward(address, port, reply) => { diff --git a/warpgate/Cargo.toml b/warpgate/Cargo.toml index 87edb83..3f0adc4 100644 --- a/warpgate/Cargo.toml +++ b/warpgate/Cargo.toml @@ -11,8 +11,8 @@ async-trait = "0.1" atty = "0.2" bytes = "1.3" clap = { version = "3.2", features = ["derive"] } -config = { version = "0.13", features = ["yaml"], default_features = false } -console = { version = "0.15", default_features = false } +config = { version = "0.13", features = ["yaml"], default-features = false } +console = { version = "0.15", default-features = false } console-subscriber = { version = "0.1", optional = true } data-encoding = "2.3" dialoguer = "0.10" diff --git a/warpgate/src/commands/test_target.rs b/warpgate/src/commands/test_target.rs index 2328d10..7f132dd 100644 --- a/warpgate/src/commands/test_target.rs +++ b/warpgate/src/commands/test_target.rs @@ -1,6 +1,6 @@ use anyhow::Result; use tracing::*; -use warpgate_common::{Target, TargetOptions}; +use warpgate_common::TargetOptions; use warpgate_core::{ProtocolServer, Services, TargetTestError}; use crate::config::load_config;