omaha_client::cup_ecdsa

Trait Cupv2RequestHandler

Source
pub trait Cupv2RequestHandler {
    // Required methods
    fn decorate_request(
        &self,
        request: &mut impl CupRequest,
    ) -> Result<RequestMetadata, CupDecorationError>;
    fn verify_response(
        &self,
        request_metadata: &RequestMetadata,
        resp: &Response<Vec<u8>>,
        public_key_id: PublicKeyId,
    ) -> Result<DerSignature, CupVerificationError>;
}

Required Methods§

Source

fn decorate_request( &self, request: &mut impl CupRequest, ) -> Result<RequestMetadata, CupDecorationError>

Decorate an outgoing client request with query parameters cup2key. Returns a struct of request metadata, the hash of which can be stored and used later.

Source

fn verify_response( &self, request_metadata: &RequestMetadata, resp: &Response<Vec<u8>>, public_key_id: PublicKeyId, ) -> Result<DerSignature, CupVerificationError>

Examines an incoming client request with an ETag HTTP Header. Returns an error if the response is not authentic.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§