Skip to content

Commit

Permalink
fix: verify issued credential
Browse files Browse the repository at this point in the history
  • Loading branch information
blelump committed Dec 6, 2024
1 parent 4fe32fa commit 82d76b2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
keri-core = { version = "0.13.0", features = ["oobi", "mailbox"]}
keri-controller = { version = "0.13.0" }
keri-core = { version = "0.14.1", features = ["oobi", "mailbox"]}
keri-controller = { version = "0.14.1"}
said = { version = "0.4.0", features = ["macros"]}
cesrox = { version = "0.1.6", features = ["cesr-proof"] }
anyhow = { version = "1.0" }
Expand Down
25 changes: 19 additions & 6 deletions src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,26 @@ pub fn handle_oobi(alias: &str, oobi_command: &Option<OobiRoles>) -> Result<Vec<
let locations = find_locations(&identifier, witnesses.clone())
.into_iter()
.map(Oobi::Location);
let witnesses_oobi = witnesses.clone().into_iter().map(|cid| {
Oobi::EndRole(EndRole {
eid: cid.clone(),
role: keri_core::oobi::Role::Witness,
cid: identifier.id().clone(),
let witnesses_oobi: Vec<Oobi> = witnesses
.iter()
.flat_map(|cid| {
let mut oobis = vec![Oobi::EndRole(EndRole {
eid: cid.clone(),
role: keri_core::oobi::Role::Witness,
cid: identifier.id().clone(),
})];

if let Some(reg) = identifier.registry_id() {
oobis.push(Oobi::EndRole(EndRole {
cid: reg.clone(),
role: keri_core::oobi::Role::Witness,
eid: cid.clone(),
}));
}

oobis
})
});
.collect();
Ok(locations.into_iter().chain(witnesses_oobi).collect())
}
}
Expand Down

0 comments on commit 82d76b2

Please sign in to comment.