Skip to content

Commit

Permalink
Merge pull request #195 from brotskydotcom/linux-native-feature
Browse files Browse the repository at this point in the history
Release v3.0.3

This fixes #194 and updates all dependencies.
  • Loading branch information
brotskydotcom authored Jul 16, 2024
2 parents 70ce2f9 + d663afd commit 3bbe2da
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["password", "credential", "keychain", "keyring", "cross-platform"]
license = "MIT OR Apache-2.0"
name = "keyring"
repository = "https://github.com/hwchen/keyring-rs.git"
version = "3.0.2"
version = "3.0.3"
rust-version = "1.75"
edition = "2021"
exclude = [".github/"]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Thanks to the following for helping make this library better, whether through co
- @Alexei-Barnes
- @benwr
- @bhkaminski
- @Brooooooklyn
- @brotskydotcom
- @complexspaces
- @connor4312
Expand Down
2 changes: 1 addition & 1 deletion src/keyutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl CredentialApi for KeyutilsCredential {
// Add to the session keyring
let key = self
.session
.add_key(&self.description, password)
.add_key(&self.description, secret)
.map_err(decode_error)?;

// Directly link to the persistent keyring as well
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ pub mod mock;
// no duplicate keystores on any platform
//
#[cfg(any(
all(feature = "linux-keyutils", feature = "sync-secret-service"),
all(feature = "linux-keyutils", feature = "async-secret-service"),
all(feature = "linux-native", feature = "sync-secret-service"),
all(feature = "linux-native", feature = "async-secret-service"),
all(feature = "sync-secret-service", feature = "async-secret-service")
))]
compile_error!("You can enable at most one keystore per target architecture");
Expand All @@ -179,9 +179,9 @@ compile_error!("You can enable at most one keystore per target architecture");
// Pick the *nix keystore
//

#[cfg(all(target_os = "linux", feature = "linux-keyutils"))]
#[cfg(all(target_os = "linux", feature = "linux-native"))]
pub mod keyutils;
#[cfg(all(target_os = "linux", feature = "linux-keyutils"))]
#[cfg(all(target_os = "linux", feature = "linux-native"))]
use keyutils as default;

#[cfg(all(
Expand All @@ -198,7 +198,7 @@ use secret_service as default;
#[cfg(all(
target_os = "linux",
not(any(
feature = "linux-keyutils",
feature = "linux-native",
feature = "sync-secret-service",
feature = "async-secret-service"
))
Expand Down
2 changes: 1 addition & 1 deletion tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn test_missing_entry() {
}

#[test]
#[cfg(all(target_os = "linux", not(feature = "linux-default-keyutils")))]
#[cfg(all(target_os = "linux", not(feature = "linux-native")))]
fn test_empty_password() {
let name = generate_random_string();
let entry = Entry::new(&name, &name).expect("Can't create entry");
Expand Down

0 comments on commit 3bbe2da

Please sign in to comment.