Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,9 @@ struct PkiPathSignatureVerifier<'a> {
}

impl<'a> PkiPathSignatureVerifier<'a> {
/// Create a new `PkiPathSignatureVerifier` with the provided
/// `Certificate` acting as the root / trust anchor. If `None` is
/// provided then the `PkiPath`s verified by this verifier must be self-
/// signed.
/// Create a new `PkiPathSignatureVerifier` permitting any `Certificate`
/// in `roots` to be a root / trust anchor. If `None` is provided then the
/// `PkiPath`s verified by this verifier must be self-signed.
fn new(
roots: Option<&'a [Certificate]>,
) -> Result<Self, PkiPathSignatureVerifierError> {
Expand Down Expand Up @@ -418,11 +417,11 @@ pub enum MeasurementSetError {
pub struct MeasurementSet(HashSet<Measurement>);

/// Construct a MeasurementSet from the provided artifacts. The
/// trustwirthiness of these artifacts must be established independently
/// trustworthiness of these artifacts must be established independently
/// (see `verify_cert_chain` and `verify_attestation`).
impl MeasurementSet {
/// Construct a MeasurementSet from the provided artifacts. The
/// trustwirthiness of these artifacts must be established independently
/// trustworthiness of these artifacts must be established independently
/// (see `verify_cert_chain` and `verify_attestation`).
pub fn from_artifacts(
pki_path: &PkiPath,
Expand Down Expand Up @@ -558,7 +557,10 @@ impl std::fmt::Display for ReferenceMeasurements {
pub enum VerifyAttestationError {
#[error("Failed to hubpack the log: {0}")]
Serialize(#[from] hubpack::error::Error),
#[error("Alias public key is malformed: spki bit string has unused bits")]
#[error(
"Alias public key is malformed: \
spki bit string does not end on octet boundary"
)]
Comment on lines +560 to +563
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my read of https://docs.rs/der/0.7.10/der/asn1/struct.BitString.html#method.as_bytes it looks like this is a more accurate description of what this variant indicates. seems reasonable to expect either way, I dunno a valid reason to see OddKey typically..

OddKey,
#[error("Failed to construct VerifyingKey from alias public key: {0}")]
KeyConversion(ed25519_dalek::ed25519::Error),
Expand Down
Loading