Module cose

Source
Expand description

This module provides functions for working with COSE signatures.

Structs§

CertificateInfo
Summary information about an X.509 signing certificate and the validation performed on it.
CertificateTrustPolicy
A CertificateTrustPolicy is configured with information about trust anchors, privately-accepted end-entity certificates, and allowed EKUs. It can be used to evaluate a signing certificate against those policies.
InvalidCertificateError
This error can occur when adding certificates to a CertificateTrustPolicy.

Enums§

CertificateProfileError
Describes errors that can be identified when checking a certificate’s profile.
CertificateTrustError
Describes errors that can be identified when evaluating a certificate’s trust.
CoseError
Describes errors that can occur when processing or generating COSE signatures.
OcspFetchPolicy
Policy for fetching OCSP responses.
TimeStampStorage
The TimeStampStorage parameter defines how RFC 3161 time stamps are to be stored in a COSE signature.
Verifier
A Verifier reads a COSE signature and reports on its validity.

Functions§

cert_chain_from_sign1
TO DO: Documentation for this function.
check_certificate_profile
Verify that an X.509 certificate meets the requirements stated in §14.5.1, Certificate Profiles.
check_ocsp_status
Given a COSE signature, extract the OCSP data and validate the status of that report.
check_ocsp_status_async
Given a COSE signature, extract the OCSP data and validate the status of that report.
parse_cose_sign1
Parse a byte slice as a COSE Sign1 data structure.
sign
Given an arbitrary block of data and a RawSigner or AsyncRawSigner instance, generate a COSE signature for that block of data.
sign_async
Given an arbitrary block of data and a RawSigner or AsyncRawSigner instance, generate a COSE signature for that block of data.
signing_alg_from_sign1
TO DO: Documentation for this function.
signing_time_from_sign1
Return the time of signing for this signature.
signing_time_from_sign1_async
Return the time of signing for this signature.