pub trait ArtifactSigner {
// Required methods
fn kid(&self) -> &str;
fn cose_algorithm(&self) -> SigningAlgorithm;
fn jws_algorithm(&self) -> &str;
fn sign(&self, data: &[u8]) -> Result<Vec<u8>, CoseError>;
}Expand description
Signs PIC artifacts (COSE payloads and the JWS envelope) with one key.
Implemented by workloads (candidate artifacts) and by the settlement authority (checkpoints and settled artifacts).
Required Methods§
Sourcefn kid(&self) -> &str
fn kid(&self) -> &str
Key identifier (SPIFFE ID, DID, URL, …) placed in the COSE protected header.
Sourcefn cose_algorithm(&self) -> SigningAlgorithm
fn cose_algorithm(&self) -> SigningAlgorithm
COSE algorithm this signer produces.
Sourcefn jws_algorithm(&self) -> &str
fn jws_algorithm(&self) -> &str
JOSE alg value for JWS signatures (for example "EdDSA").
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".