Skip to content

Commit

Permalink
chore: pass config for es256 into SecretManager builder
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-mader committed Aug 12, 2024
1 parent a17570d commit b230a2d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
18 changes: 9 additions & 9 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ edition = "2021"
rust-version = "1.76.0"

[workspace.dependencies]
did_manager = { git = "https://git@github.com/impierce/did-manager.git", rev = "833019b" }
did_manager = { git = "https://git@github.com/impierce/did-manager.git", rev = "d49c4f1" }
siopv2 = { git = "https://git@github.com/impierce/openid4vc.git", rev = "12fed14" }
oid4vci = { git = "https://git@github.com/impierce/openid4vc.git", rev = "12fed14" }
oid4vc-core = { git = "https://git@github.com/impierce/openid4vc.git", rev = "12fed14" }
Expand Down
2 changes: 2 additions & 0 deletions agent_application/example.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ signing_algorithms_supported:
eddsa:
enabled: true
preferred: true
es256:
enabled: true

# TODO: required to be stated explicitly?
vp_formats:
Expand Down
6 changes: 5 additions & 1 deletion agent_secret_manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ pub async fn secret_manager() -> SecretManager {
builder = builder.with_ed25519_key(&issuer_eddsa_key_id);
}

if let Some(issuer_es256_key_id) = issuer_es256_key_id {
builder = builder.with_es256_key(&issuer_es256_key_id);
}

// If `did:iota:rms` is enabled, further values are required.
if get_all_enabled_did_methods().contains(&agent_shared::config::SupportedDidMethod::IotaRms) {
builder =
builder
.with_did(
&issuer_did
.expect("`You have enabled did:iota:rms, which requires the DID. Please provide the value through the config or environment variable.`"),
.expect("`You have enabled did:iota:rms, which requires a known DID. Please provide the value through the config or environment variable.`"),
)
.with_fragment(&issuer_fragment.expect(
"`You have enabled did:iota:rms, which requires the fragment identifier of the key to be used. Please provide the value through the config or environment variable.`",
Expand Down

0 comments on commit b230a2d

Please sign in to comment.