Skip to content

Commit

Permalink
inspect: display root key identifier when available
Browse files Browse the repository at this point in the history
  • Loading branch information
divarvel committed May 30, 2023
1 parent df8f5a8 commit 19e8cf5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 3 additions & 6 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 @@ path = "src/main.rs"

[dependencies]
atty = "0.2.14"
biscuit-auth = "3.1.0"
biscuit-auth = { git = "https://github.com/biscuit-auth/biscuit-rust", branch = "main" }
clap = { version = "^3.0", features = ["color", "derive"] }
chrono = "^0.4"
hex = "0.4.3"
Expand Down
6 changes: 5 additions & 1 deletion src/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ pub fn handle_inspect(inspect: &Inspect) -> Result<()> {
let external_keys = biscuit.external_public_keys();
for i in 0..biscuit.block_count() {
if i == 0 {
println!("Authority block:");
if let Some(root_key_id) = biscuit.root_key_id() {
println!("Authority block (root key identifier: {}):", &root_key_id);
} else {
println!("Authority block:");
}
} else if let Some(Some(epk)) = external_keys.get(i) {
println!(
"Block n°{}, (third party, signed by {}):",
Expand Down

0 comments on commit 19e8cf5

Please sign in to comment.