[fractal] Update secret-service to v2.0
- From: Alejandro Domínguez <aledomu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] Update secret-service to v2.0
- Date: Thu, 4 Feb 2021 13:50:52 +0000 (UTC)
commit 5ed6b5863c455787e9be4dd13b9ccceb2bd1f497
Author: Johannes Hayeß <jhaye mailbox org>
Date: Sat Jan 16 00:13:32 2021 +0100
Update secret-service to v2.0
Cargo.lock | 504 ++++++++++++++++++++++++-----------------
fractal-gtk/Cargo.toml | 3 +-
fractal-gtk/src/appop/login.rs | 6 +-
fractal-gtk/src/passwd.rs | 104 +++++----
4 files changed, 355 insertions(+), 262 deletions(-)
---
diff --git a/Cargo.lock b/Cargo.lock
index 37b0ee69..62e89e7d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,13 +2,13 @@
# It is not intended for manual editing.
[[package]]
name = "aes"
-version = "0.4.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7001367fde4c768a19d1029f0a8be5abd9308e1119846d5bd9ad26297b8faf5"
+checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561"
dependencies = [
- "aes-soft 0.4.0",
- "aesni 0.7.0",
- "block-cipher",
+ "aes-soft",
+ "aesni",
+ "cipher",
]
[[package]]
@@ -17,23 +17,12 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763"
dependencies = [
- "aes-soft 0.6.4",
- "aesni 0.10.0",
+ "aes-soft",
+ "aesni",
"cipher",
"ctr",
]
-[[package]]
-name = "aes-soft"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4925647ee64e5056cf231608957ce7c81e12d6d6e316b9ce1404778cc1d35fa7"
-dependencies = [
- "block-cipher",
- "byteorder",
- "opaque-debug 0.2.3",
-]
-
[[package]]
name = "aes-soft"
version = "0.6.4"
@@ -44,16 +33,6 @@ dependencies = [
"opaque-debug 0.3.0",
]
-[[package]]
-name = "aesni"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d050d39b0b7688b3a3254394c3e30a9d66c41dcf9b05b0e2dbdc623f6505d264"
-dependencies = [
- "block-cipher",
- "opaque-debug 0.2.3",
-]
-
[[package]]
name = "aesni"
version = "0.10.0"
@@ -139,6 +118,26 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4af5687fe33aec5e70ef14caac5e0d363e335e5e5d6385fb75978d0c241b1d67"
+[[package]]
+name = "async-io"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9315f8f07556761c3e48fec2e6b276004acf426e6dc068b2c2251854d65ee0fd"
+dependencies = [
+ "concurrent-queue",
+ "fastrand",
+ "futures-lite",
+ "libc",
+ "log",
+ "nb-connect",
+ "once_cell",
+ "parking",
+ "polling",
+ "vec-arena",
+ "waker-fn",
+ "winapi 0.3.9",
+]
+
[[package]]
name = "async-native-tls"
version = "0.3.3"
@@ -215,7 +214,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
]
[[package]]
@@ -229,12 +228,6 @@ dependencies = [
"winapi 0.3.9",
]
-[[package]]
-name = "autocfg"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
-
[[package]]
name = "autocfg"
version = "1.0.1"
@@ -298,7 +291,7 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
dependencies = [
- "block-padding",
+ "block-padding 0.1.5",
"byte-tools",
"byteorder",
"generic-array 0.12.3",
@@ -313,23 +306,14 @@ dependencies = [
"generic-array 0.14.4",
]
-[[package]]
-name = "block-cipher"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa136449e765dc7faa244561ccae839c394048667929af599b5d931ebe7b7f10"
-dependencies = [
- "generic-array 0.14.4",
-]
-
[[package]]
name = "block-modes"
-version = "0.5.0"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc7143fa8aadf0a3d8140f3f558063dcfc1b3205e5e837ad59485140f1575ae8"
+checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0"
dependencies = [
- "block-cipher",
- "block-padding",
+ "block-padding 0.2.1",
+ "cipher",
]
[[package]]
@@ -341,6 +325,12 @@ dependencies = [
"byte-tools",
]
+[[package]]
+name = "block-padding"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
+
[[package]]
name = "bumpalo"
version = "3.4.0"
@@ -375,6 +365,12 @@ version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
+[[package]]
+name = "cache-padded"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
+
[[package]]
name = "cairo-rs"
version = "0.9.1"
@@ -456,15 +452,6 @@ dependencies = [
"vec_map",
]
-[[package]]
-name = "cloudabi"
-version = "0.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
-dependencies = [
- "bitflags",
-]
-
[[package]]
name = "cmake"
version = "0.1.45"
@@ -491,6 +478,15 @@ dependencies = [
"unicode_categories",
]
+[[package]]
+name = "concurrent-queue"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3"
+dependencies = [
+ "cache-padded",
+]
+
[[package]]
name = "console_error_panic_hook"
version = "0.1.6"
@@ -574,7 +570,7 @@ version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"cfg-if 0.1.10",
"lazy_static",
]
@@ -585,7 +581,7 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"cfg-if 1.0.0",
"lazy_static",
]
@@ -596,16 +592,6 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
-[[package]]
-name = "crypto-mac"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
-dependencies = [
- "generic-array 0.14.4",
- "subtle",
-]
-
[[package]]
name = "crypto-mac"
version = "0.10.0"
@@ -637,12 +623,14 @@ dependencies = [
]
[[package]]
-name = "dbus"
-version = "0.2.3"
+name = "derivative"
+version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4a0c10ea61042b7555729ab0608727bbbb06ce709c11e6047cfa4e10f6d052d"
+checksum = "eaed5874effa6cde088c644ddcdcb4ffd1511391c5be4fdd7a5ccd02c7e4a183"
dependencies = [
- "libc",
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -727,12 +715,42 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca"
+[[package]]
+name = "enumflags2"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0"
+dependencies = [
+ "enumflags2_derive",
+ "serde",
+]
+
+[[package]]
+name = "enumflags2_derive"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "fake-simd"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
+[[package]]
+name = "fastrand"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca5faf057445ce5c9d4329e382b2ce7ca38550ef3b73a5348362d5f24e0c7fe3"
+dependencies = [
+ "instant",
+]
+
[[package]]
name = "fnv"
version = "1.0.7"
@@ -799,6 +817,7 @@ dependencies = [
"matrix-sdk",
"md5",
"mdl",
+ "once_cell",
"pango",
"rand 0.7.3",
"regex",
@@ -816,12 +835,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69a039c3498dc930fe810151a34ba0c1c70b02b8625035592e74432f678591f2"
-[[package]]
-name = "fuchsia-cprng"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
-
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
@@ -902,6 +915,21 @@ version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb"
+[[package]]
+name = "futures-lite"
+version = "1.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb"
+dependencies = [
+ "fastrand",
+ "futures-core",
+ "futures-io",
+ "memchr",
+ "parking",
+ "pin-project-lite 0.2.0",
+ "waker-fn",
+]
+
[[package]]
name = "futures-locks"
version = "0.6.0"
@@ -1506,22 +1534,12 @@ checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35"
[[package]]
name = "hkdf"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe1149865383e4526a43aee8495f9a325f0b806c63ce6427d06336a590abbbc9"
-dependencies = [
- "digest 0.9.0",
- "hmac 0.8.1",
-]
-
-[[package]]
-name = "hmac"
-version = "0.8.1"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
+checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f"
dependencies = [
- "crypto-mac 0.8.0",
"digest 0.9.0",
+ "hmac",
]
[[package]]
@@ -1530,7 +1548,7 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15"
dependencies = [
- "crypto-mac 0.10.0",
+ "crypto-mac",
"digest 0.9.0",
]
@@ -1651,7 +1669,7 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"hashbrown",
]
@@ -1999,7 +2017,7 @@ dependencies = [
"byteorder",
"dashmap",
"getrandom 0.2.0",
- "hmac 0.10.1",
+ "hmac",
"matrix-sdk-common",
"matrix-sdk-common-macros",
"olm-rs",
@@ -2115,6 +2133,16 @@ dependencies = [
"tempfile",
]
+[[package]]
+name = "nb-connect"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8123a81538e457d44b933a02faf885d3fe8408806b23fa700e8f01c6c3a98998"
+dependencies = [
+ "libc",
+ "winapi 0.3.9",
+]
+
[[package]]
name = "net2"
version = "0.2.35"
@@ -2132,6 +2160,19 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
+[[package]]
+name = "nix"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363"
+dependencies = [
+ "bitflags",
+ "cc",
+ "cfg-if 0.1.10",
+ "libc",
+ "void",
+]
+
[[package]]
name = "nom"
version = "6.0.1"
@@ -2164,7 +2205,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"num-integer",
"num-traits",
]
@@ -2184,7 +2225,7 @@ version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"num-traits",
]
@@ -2194,7 +2235,7 @@ version = "0.1.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"num-integer",
"num-traits",
]
@@ -2205,7 +2246,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"num-bigint",
"num-integer",
"num-traits",
@@ -2217,7 +2258,7 @@ version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
]
[[package]]
@@ -2296,7 +2337,7 @@ version = "0.9.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de"
dependencies = [
- "autocfg 1.0.1",
+ "autocfg",
"cc",
"libc",
"pkg-config",
@@ -2330,6 +2371,12 @@ dependencies = [
"system-deps",
]
+[[package]]
+name = "parking"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
+
[[package]]
name = "paste"
version = "1.0.3"
@@ -2342,7 +2389,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3b8c0d71734018084da0c0354193a5edfb81b20d2d57a92c5b154aefc554a4a"
dependencies = [
- "crypto-mac 0.10.0",
+ "crypto-mac",
]
[[package]]
@@ -2496,6 +2543,19 @@ version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
+[[package]]
+name = "polling"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2a7bc6b2a29e632e45451c941832803a18cce6781db04de8a04696cdca8bde4"
+dependencies = [
+ "cfg-if 0.1.10",
+ "libc",
+ "log",
+ "wepoll-sys",
+ "winapi 0.3.9",
+]
+
[[package]]
name = "ppv-lite86"
version = "0.2.10"
@@ -2583,25 +2643,6 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8"
-[[package]]
-name = "rand"
-version = "0.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
-dependencies = [
- "autocfg 0.1.7",
- "libc",
- "rand_chacha 0.1.1",
- "rand_core 0.4.2",
- "rand_hc 0.1.0",
- "rand_isaac",
- "rand_jitter",
- "rand_os",
- "rand_pcg 0.1.2",
- "rand_xorshift",
- "winapi 0.3.9",
-]
-
[[package]]
name = "rand"
version = "0.7.3"
@@ -2613,17 +2654,19 @@ dependencies = [
"rand_chacha 0.2.2",
"rand_core 0.5.1",
"rand_hc 0.2.0",
- "rand_pcg 0.2.1",
+ "rand_pcg",
]
[[package]]
-name = "rand_chacha"
-version = "0.1.1"
+name = "rand"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
+checksum = "c24fcd450d3fa2b592732565aa4f17a27a61c65ece4726353e000939b0edee34"
dependencies = [
- "autocfg 0.1.7",
- "rand_core 0.3.1",
+ "libc",
+ "rand_chacha 0.3.0",
+ "rand_core 0.6.1",
+ "rand_hc 0.3.0",
]
[[package]]
@@ -2637,20 +2680,15 @@ dependencies = [
]
[[package]]
-name = "rand_core"
-version = "0.3.1"
+name = "rand_chacha"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
+checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
dependencies = [
- "rand_core 0.4.2",
+ "ppv-lite86",
+ "rand_core 0.6.1",
]
-[[package]]
-name = "rand_core"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
-
[[package]]
name = "rand_core"
version = "0.5.1"
@@ -2661,12 +2699,12 @@ dependencies = [
]
[[package]]
-name = "rand_hc"
-version = "0.1.0"
+name = "rand_core"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
+checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5"
dependencies = [
- "rand_core 0.3.1",
+ "getrandom 0.2.0",
]
[[package]]
@@ -2679,47 +2717,12 @@ dependencies = [
]
[[package]]
-name = "rand_isaac"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
-dependencies = [
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rand_jitter"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
-dependencies = [
- "libc",
- "rand_core 0.4.2",
- "winapi 0.3.9",
-]
-
-[[package]]
-name = "rand_os"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
-dependencies = [
- "cloudabi",
- "fuchsia-cprng",
- "libc",
- "rand_core 0.4.2",
- "rdrand",
- "winapi 0.3.9",
-]
-
-[[package]]
-name = "rand_pcg"
-version = "0.1.2"
+name = "rand_hc"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
+checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
dependencies = [
- "autocfg 0.1.7",
- "rand_core 0.4.2",
+ "rand_core 0.6.1",
]
[[package]]
@@ -2731,24 +2734,6 @@ dependencies = [
"rand_core 0.5.1",
]
-[[package]]
-name = "rand_xorshift"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
-dependencies = [
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rdrand"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
-dependencies = [
- "rand_core 0.3.1",
-]
-
[[package]]
name = "redox_syscall"
version = "0.1.57"
@@ -3045,18 +3030,22 @@ checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
[[package]]
name = "secret-service"
-version = "1.1.1"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe0903e5d5de19c5f0add54005dab183b555dca4eb12b023e967906284a9120c"
+checksum = "2400fb1bf2a87b303ada204946294f932ade4929477e9e2bf66d7b49a66656ec"
dependencies = [
"aes",
"block-modes",
- "dbus",
"hkdf",
"lazy_static",
"num",
- "rand 0.6.5",
+ "rand 0.8.1",
+ "serde",
"sha2",
+ "zbus",
+ "zbus_macros",
+ "zvariant",
+ "zvariant_derive",
]
[[package]]
@@ -3105,18 +3094,18 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
[[package]]
name = "serde"
-version = "1.0.117"
+version = "1.0.119"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a"
+checksum = "9bdd36f49e35b61d49efd8aa7fc068fd295961fd2286d0b2ee9a4c7a14e99cc3"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.117"
+version = "1.0.119"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e"
+checksum = "552954ce79a059ddd5fd68c271592374bd15cab2274970380c000118aeffe1cd"
dependencies = [
"proc-macro2",
"quote",
@@ -3134,6 +3123,17 @@ dependencies = [
"serde",
]
+[[package]]
+name = "serde_repr"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "serde_urlencoded"
version = "0.7.0"
@@ -3451,9 +3451,9 @@ checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd"
[[package]]
name = "syn"
-version = "1.0.51"
+version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b4f34193997d92804d359ed09953e25d5138df6bcc055a71bf68ee89fdf9223"
+checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5"
dependencies = [
"proc-macro2",
"quote",
@@ -3868,6 +3868,12 @@ version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
+[[package]]
+name = "vec-arena"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d"
+
[[package]]
name = "vec_map"
version = "0.8.2"
@@ -3886,6 +3892,18 @@ version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
+[[package]]
+name = "void"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
+
+[[package]]
+name = "waker-fn"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
+
[[package]]
name = "want"
version = "0.3.0"
@@ -4010,6 +4028,15 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "wepoll-sys"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "winapi"
version = "0.2.8"
@@ -4081,6 +4108,41 @@ dependencies = [
"time 0.1.44",
]
+[[package]]
+name = "zbus"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40b4d4aa39daed4e32aed75f0c37b969184949a0fdfd5f2e1277abfda61f02a8"
+dependencies = [
+ "async-io",
+ "byteorder",
+ "derivative",
+ "enumflags2",
+ "fastrand",
+ "futures",
+ "nb-connect",
+ "nix",
+ "once_cell",
+ "polling",
+ "scoped-tls",
+ "serde",
+ "serde_repr",
+ "zbus_macros",
+ "zvariant",
+]
+
+[[package]]
+name = "zbus_macros"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc141cda72384bef359badf1808e391d3968f9299e8f3c3cbb78dafa1e0930"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "zeroize"
version = "1.1.1"
@@ -4101,3 +4163,27 @@ dependencies = [
"syn",
"synstructure",
]
+
+[[package]]
+name = "zvariant"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bfdc513511335faee7b18d6e8b6086de555d6e8b0a598415571bb0f0b446519"
+dependencies = [
+ "byteorder",
+ "enumflags2",
+ "serde",
+ "zvariant_derive",
+]
+
+[[package]]
+name = "zvariant_derive"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6651d08772eefc17d36ef4da3a521b2e5f87c10ef730125b83eb500512073c92"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
diff --git a/fractal-gtk/Cargo.toml b/fractal-gtk/Cargo.toml
index 44d6ec92..fd0d7f6d 100644
--- a/fractal-gtk/Cargo.toml
+++ b/fractal-gtk/Cargo.toml
@@ -27,10 +27,11 @@ log = "0.4.8"
loggerv = "0.7.2"
md5 = "0.7.0"
mdl = "1.0.5"
+once_cell = "1.5.2"
pango = "0.9.0"
rand = "0.7.3"
regex = "1.3.4"
-secret-service = "1.0.0"
+secret-service = "2.0.1"
serde_json = "1.0.48"
sourceview4 = "0.2.0"
gspell = "0.5.0"
diff --git a/fractal-gtk/src/appop/login.rs b/fractal-gtk/src/appop/login.rs
index 98f75a90..8750bffa 100644
--- a/fractal-gtk/src/appop/login.rs
+++ b/fractal-gtk/src/appop/login.rs
@@ -14,7 +14,7 @@ use crate::cache;
use crate::client::get_matrix_client;
use crate::passwd::PasswordStorage;
-use secret_service::SsError;
+use secret_service::Error as SsError;
use crate::actions::AppState;
@@ -31,7 +31,7 @@ impl AppOp {
) {
match self.store_token(uid.clone(), access_token.clone()) {
Err(SsError::Locked) => error!("Can’t store the token, keyring is locked."),
- Err(SsError::Dbus(_)) => error!("Can’t store the token, no Secret Service available."),
+ Err(SsError::Zbus(_)) => error!("Can’t store the token, no Secret Service available."),
_ => (),
};
@@ -92,7 +92,7 @@ impl AppOp {
identity.clone(),
) {
Err(SsError::Locked) => error!("Can’t store the password, keyring is locked."),
- Err(SsError::Dbus(_)) => {
+ Err(SsError::Zbus(_)) => {
error!("Can’t store the password, no Secret Service available.")
}
_ => (),
diff --git a/fractal-gtk/src/passwd.rs b/fractal-gtk/src/passwd.rs
index 2d8563cf..94b1cd11 100644
--- a/fractal-gtk/src/passwd.rs
+++ b/fractal-gtk/src/passwd.rs
@@ -10,8 +10,8 @@ pub enum Error {
IdParseError(IdError),
}
-impl From<secret_service::SsError> for Error {
- fn from(_: secret_service::SsError) -> Error {
+impl From<secret_service::Error> for Error {
+ fn from(_: secret_service::Error) -> Error {
Error::SecretServiceError
}
}
@@ -29,7 +29,7 @@ impl From<IdError> for Error {
}
pub trait PasswordStorage {
- fn delete_secret(&self, key: &str) -> Result<(), secret_service::SsError> {
+ fn delete_secret(&self, key: &str) -> Result<(), secret_service::Error> {
ss_storage::delete_secret(key)
}
@@ -39,7 +39,7 @@ pub trait PasswordStorage {
password: String,
server: Url,
identity: Box<ServerName>,
- ) -> Result<(), secret_service::SsError> {
+ ) -> Result<(), secret_service::Error> {
ss_storage::store_pass(username, password, server, identity)
}
@@ -47,7 +47,7 @@ pub trait PasswordStorage {
ss_storage::get_pass()
}
- fn store_token(&self, uid: UserId, token: AccessToken) -> Result<(), secret_service::SsError> {
+ fn store_token(&self, uid: UserId, token: AccessToken) -> Result<(), secret_service::Error> {
ss_storage::store_token(uid, token)
}
@@ -57,19 +57,23 @@ pub trait PasswordStorage {
}
mod ss_storage {
- use super::Error;
- use crate::api::r0::AccessToken;
- use matrix_sdk::identifiers::{ServerName, UserId};
+ use std::collections::HashMap;
use std::convert::{TryFrom, TryInto};
- use url::Url;
- use secret_service::{Collection, EncryptionType, SecretService, SsError};
+ use matrix_sdk::identifiers::{ServerName, UserId};
+ use once_cell::sync::Lazy;
+ use secret_service::{Collection, EncryptionType, Error as SsError, SecretService};
+ use url::Url;
+ use super::Error;
+ use crate::api::r0::AccessToken;
use crate::globals;
- pub fn delete_secret(key: &str) -> Result<(), secret_service::SsError> {
- let ss = SecretService::new(EncryptionType::Dh)?;
- let collection = get_default_collection_unlocked(&ss)?;
+ static SECRET_SERVICE: Lazy<Result<SecretService<'static>, SsError>> =
+ Lazy::new(|| SecretService::new(EncryptionType::Dh));
+
+ pub fn delete_secret(key: &str) -> Result<(), SsError> {
+ let collection = get_default_collection_unlocked()?;
// deleting previous items
let allpass = collection.get_all_items()?;
@@ -85,28 +89,28 @@ mod ss_storage {
}
pub fn store_token(uid: UserId, token: AccessToken) -> Result<(), SsError> {
- let ss = SecretService::new(EncryptionType::Dh)?;
- let collection = get_default_collection_unlocked(&ss)?;
+ let collection = get_default_collection_unlocked()?;
let key = "fractal-token";
// deleting previous items
delete_secret(key)?;
// create new item
+ let mut attributes = HashMap::new();
+ attributes.insert("uid", uid.as_str());
collection.create_item(
- key, // label
- vec![("uid", &uid.to_string())], // properties
- token.to_string().as_bytes(), // secret
- true, // replace item with same attributes
- "text/plain", // secret content type
+ key, // label
+ attributes, // properties
+ token.to_string().as_bytes(), // secret
+ true, // replace item with same attributes
+ "text/plain", // secret content type
)?;
Ok(())
}
pub fn get_token() -> Result<(Option<AccessToken>, UserId), Error> {
- let ss = SecretService::new(EncryptionType::Dh)?;
- let collection = get_default_collection_unlocked(&ss)?;
+ let collection = get_default_collection_unlocked()?;
let allpass = collection.get_all_items()?;
let key = "fractal-token";
@@ -140,33 +144,31 @@ mod ss_storage {
password: String,
server: Url,
identity: Box<ServerName>,
- ) -> Result<(), secret_service::SsError> {
- let ss = SecretService::new(EncryptionType::Dh)?;
- let collection = get_default_collection_unlocked(&ss)?;
+ ) -> Result<(), SsError> {
+ let collection = get_default_collection_unlocked()?;
let key = "fractal";
// deleting previous items
delete_secret(key)?;
// create new item
+ let mut attributes = HashMap::new();
+ attributes.insert("username", username.as_str());
+ attributes.insert("server", server.as_str());
+ attributes.insert("identity", identity.as_str());
collection.create_item(
- key, // label
- vec![
- ("username", &username),
- ("server", server.as_str()),
- ("identity", identity.as_str()),
- ], // properties
+ key, // label
+ attributes, // properties
password.as_bytes(), //secret
- true, // replace item with same attributes
- "text/plain", // secret content type
+ true, // replace item with same attributes
+ "text/plain", // secret content type
)?;
Ok(())
}
pub fn migrate_old_passwd() -> Result<(), Error> {
- let ss = SecretService::new(EncryptionType::Dh)?;
- let collection = get_default_collection_unlocked(&ss)?;
+ let collection = get_default_collection_unlocked()?;
let allpass = collection.get_all_items()?;
// old name password
@@ -210,8 +212,7 @@ mod ss_storage {
pub fn get_pass() -> Result<(String, String, Url, Box<ServerName>), Error> {
migrate_old_passwd()?;
- let ss = SecretService::new(EncryptionType::Dh)?;
- let collection = get_default_collection_unlocked(&ss)?;
+ let collection = get_default_collection_unlocked()?;
let allpass = collection.get_all_items()?;
let key = "fractal";
@@ -265,17 +266,22 @@ mod ss_storage {
Ok(tup)
}
- fn get_default_collection_unlocked(
- secret_service: &SecretService,
- ) -> Result<Collection, secret_service::SsError> {
- let collection = match secret_service.get_default_collection() {
- Ok(col) => col,
- Err(SsError::NoResult) => secret_service.create_collection("default", "default")?,
- Err(x) => return Err(x),
- };
-
- collection.unlock()?;
-
- Ok(collection)
+ fn get_default_collection_unlocked<'a>() -> Result<Collection<'a>, SsError> {
+ if SECRET_SERVICE.is_ok() {
+ let ss = SECRET_SERVICE.as_ref().unwrap();
+ let collection = match ss.get_default_collection() {
+ Ok(col) => col,
+ Err(SsError::NoResult) => ss.create_collection("default", "default")?,
+ Err(x) => return Err(x),
+ };
+
+ collection.unlock()?;
+
+ Ok(collection)
+ } else {
+ Err(SsError::Crypto(
+ "Error encountered when initiating secret service connection.".to_string(),
+ ))
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]