Skip to content

feat: use builder pattern in attestation crate to tune attestation logic #19

@0x416e746f6e

Description

@0x416e746f6e

in attestation crate we have two methods verify_dcap_attestation (with basic list of args) and verify_dcap_attestation_with_given_timestamp (with extended list) that could be collapsed into just one if we use builder pattern.

for example, we could have something like:

#[derive(Default)]
struct Verifier {
    pccs_url: Option<String>,
    now: Option<u64>,
    collateral: Option<QuoteCollateralV3>,
    override_azure_outdated_tcb: bool,
}

with builder methods like .with_pccs_url(pccs_url), and a method .verify(input, expected_result)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions