Skip to content

Commit

Permalink
Merge pull request #14 from cipherstash/bug-132/optional-config-files
Browse files Browse the repository at this point in the history
Update to cipherstash-client 0.17.pre.1, use optional for file sources
  • Loading branch information
coderdan authored Feb 28, 2025
2 parents c532cc9 + ceafcca commit d8766ee
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 56 deletions.
75 changes: 22 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/protect-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cipherstash-client = "=0.17.0-pre"
cipherstash-client = "=0.17.0-pre.1"
neon = "1"
once_cell = "1.20.2"
thiserror = "2.0.8"
Expand Down
5 changes: 3 additions & 2 deletions crates/protect-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ async fn new_client_inner() -> Result<Client, Error> {
let cts_config = CtsConfig::builder().with_env().build()?;
let zerokms_config = ZeroKMSConfig::builder()
.add_source(EnvSource::default())
.add_source(CIPHERSTASH_SECRET_TOML)
.add_source(CIPHERSTASH_TOML)
// Both files are optional and ignored if the file doesn't exist
.add_source(CIPHERSTASH_SECRET_TOML.optional())
.add_source(CIPHERSTASH_TOML.optional())
.console_config(&console_config)
.cts_config(&cts_config)
.build_with_client_key()?;
Expand Down

0 comments on commit d8766ee

Please sign in to comment.