Skip to content

Commit

Permalink
Rename verifier crate to dice-verifier
Browse files Browse the repository at this point in the history
This makes it easier and more explicit to use as a library in other
crates such as sprockets.
  • Loading branch information
andrewjstone committed Jun 12, 2024
1 parent bc35e17 commit f3a7e5a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
34 changes: 17 additions & 17 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 verifier-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ p384 = { workspace = true, default-features = true }
pem-rfc7468 = { workspace = true, features = ["alloc", "std"] }
sha3.workspace = true
tempfile.workspace = true
verifier.path = "../verifier"
dice-verifier.path = "../verifier"
x509-cert = { workspace = true, default-features = true }
4 changes: 2 additions & 2 deletions verifier-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use anyhow::{anyhow, Context, Result};
use attest_data::{Attestation, Nonce};
use clap::{Parser, Subcommand, ValueEnum};
use dice_verifier::PkiPathSignatureVerifier;
use env_logger::Builder;
use hubpack::SerializedSize;
use log::{debug, error, info, warn, LevelFilter};
Expand All @@ -18,7 +19,6 @@ use std::{
process::{Command, Output},
};
use tempfile::NamedTempFile;
use verifier::PkiPathSignatureVerifier;
use x509_cert::{
der::{Decode, DecodePem},
Certificate, PkiPath,
Expand Down Expand Up @@ -634,7 +634,7 @@ fn verify_attestation(

let alias = Certificate::from_der(&alias)?;

verifier::verify_attestation(&alias, &attestation, &log, &nonce)
dice_verifier::verify_attestation(&alias, &attestation, &log, &nonce)
}

fn verify_cert_chain(
Expand Down
2 changes: 1 addition & 1 deletion verifier/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "verifier"
name = "dice-verifier"
version = "0.1.0"
edition = "2021"
description = "a library crate implementing the attestation verifier"
Expand Down
1 change: 1 addition & 0 deletions verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ impl CertVerifier for P384CertVerifier {
}

/// This struct encapsulates the signature verification process for a PkiPath.
#[derive(Debug)]
pub struct PkiPathSignatureVerifier {
root_cert: Option<Certificate>,
}
Expand Down

0 comments on commit f3a7e5a

Please sign in to comment.