mirror of
https://github.com/veeso/termscp.git
synced 2026-09-26 05:51:20 -07:00
keyring 1.0.0
This commit is contained in:
committed by
Christian Visintin
parent
4897253932
commit
332284fec3
+3
-1
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
## 0.8.0
|
## 0.8.0
|
||||||
|
|
||||||
Released on FIXME:
|
Released on 06/01/2022
|
||||||
|
|
||||||
> ❄️ Winter update 2022 ⛄
|
> ❄️ Winter update 2022 ⛄
|
||||||
|
|
||||||
@@ -76,6 +76,8 @@ Released on FIXME:
|
|||||||
- It is now possible to enable the `TRACE` level with the `-D` CLI option.
|
- It is now possible to enable the `TRACE` level with the `-D` CLI option.
|
||||||
- Dependencies:
|
- Dependencies:
|
||||||
- Added `unicode-width 0.1.8`
|
- Added `unicode-width 0.1.8`
|
||||||
|
- Updated `argh` to `0.1.7`
|
||||||
|
- Updated `keyring` to `1.0.0`
|
||||||
- Updated `tui-realm` to `1.4.2`
|
- Updated `tui-realm` to `1.4.2`
|
||||||
- Updated `tui-realm-stdlib` to `1.1.4`
|
- Updated `tui-realm-stdlib` to `1.1.4`
|
||||||
- Removed `rust-s3`, `ssh2`, `suppaftp`; replaced by `remotefs 0.2.0`, `remotefs-aws-s3 0.1.0`, `remotefs-ftp 0.1.0` and `remotefs-ssh 0.1.0`
|
- Removed `rust-s3`, `ssh2`, `suppaftp`; replaced by `remotefs 0.2.0`, `remotefs-aws-s3 0.1.0`, `remotefs-ftp 0.1.0` and `remotefs-ssh 0.1.0`
|
||||||
|
|||||||
Generated
+602
-416
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -24,7 +24,7 @@ termscp = { path = "/usr/bin/termscp" }
|
|||||||
|
|
||||||
[package.metadata.deb]
|
[package.metadata.deb]
|
||||||
maintainer = "Christian Visintin <christian.visintin1997@gmail.com>"
|
maintainer = "Christian Visintin <christian.visintin1997@gmail.com>"
|
||||||
copyright = "2021, Christian Visintin <christian.visintin1997@gmail.com>"
|
copyright = "2022, Christian Visintin <christian.visintin1997@gmail.com>"
|
||||||
extended-description-file = "docs/misc/README.deb.txt"
|
extended-description-file = "docs/misc/README.deb.txt"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
@@ -32,7 +32,7 @@ name = "termscp"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
argh = "0.1.6"
|
argh = "0.1.7"
|
||||||
bitflags = "1.3.2"
|
bitflags = "1.3.2"
|
||||||
bytesize = "1.1.0"
|
bytesize = "1.1.0"
|
||||||
chrono = "0.4.19"
|
chrono = "0.4.19"
|
||||||
@@ -40,7 +40,7 @@ content_inspector = "0.2.4"
|
|||||||
dirs = "4.0.0"
|
dirs = "4.0.0"
|
||||||
edit = "0.1.3"
|
edit = "0.1.3"
|
||||||
hostname = "0.3.1"
|
hostname = "0.3.1"
|
||||||
keyring = { version = "0.10.1", optional = true }
|
keyring = { version = "1.0.0", optional = true }
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
magic-crypt = "3.1.7"
|
magic-crypt = "3.1.7"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
// Local
|
// Local
|
||||||
use super::{KeyStorage, KeyStorageError};
|
use super::{KeyStorage, KeyStorageError};
|
||||||
// Ext
|
// Ext
|
||||||
use keyring::{Keyring, KeyringError};
|
use keyring::{Entry as Keyring, Error as KeyringError};
|
||||||
|
|
||||||
/// provides a `KeyStorage` implementation using the keyring crate
|
/// provides a `KeyStorage` implementation using the keyring crate
|
||||||
pub struct KeyringStorage {
|
pub struct KeyringStorage {
|
||||||
@@ -53,15 +53,13 @@ impl KeyStorage for KeyringStorage {
|
|||||||
match storage.get_password() {
|
match storage.get_password() {
|
||||||
Ok(s) => Ok(s),
|
Ok(s) => Ok(s),
|
||||||
Err(e) => match e {
|
Err(e) => match e {
|
||||||
KeyringError::NoPasswordFound => Err(KeyStorageError::NoSuchKey),
|
KeyringError::NoEntry => Err(KeyStorageError::NoSuchKey),
|
||||||
#[cfg(target_os = "windows")]
|
KeyringError::PlatformFailure(_)
|
||||||
KeyringError::WindowsVaultError => Err(KeyStorageError::NoSuchKey),
|
| KeyringError::NoStorageAccess(_)
|
||||||
#[cfg(target_os = "macos")]
|
| KeyringError::WrongCredentialPlatform => Err(KeyStorageError::ProviderError),
|
||||||
KeyringError::MacOsKeychainError(_) => Err(KeyStorageError::NoSuchKey),
|
KeyringError::BadEncoding(_) | KeyringError::TooLong(_, _) => {
|
||||||
#[cfg(target_os = "linux")]
|
Err(KeyStorageError::BadSytax)
|
||||||
KeyringError::SecretServiceError(_) => Err(KeyStorageError::ProviderError),
|
}
|
||||||
KeyringError::Parse(_) => Err(KeyStorageError::BadSytax),
|
|
||||||
_ => Err(KeyStorageError::ProviderError),
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -84,13 +82,8 @@ impl KeyStorage for KeyringStorage {
|
|||||||
// Check what kind of error is returned
|
// Check what kind of error is returned
|
||||||
match storage.get_password() {
|
match storage.get_password() {
|
||||||
Ok(_) => true,
|
Ok(_) => true,
|
||||||
#[cfg(not(target_os = "linux"))]
|
Err(KeyringError::NoStorageAccess(_) | KeyringError::PlatformFailure(_)) => false,
|
||||||
Err(err) => !matches!(err, KeyringError::NoBackendFound),
|
Err(_) => true,
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
Err(err) => !matches!(
|
|
||||||
err,
|
|
||||||
KeyringError::NoBackendFound | KeyringError::SecretServiceError(_)
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user