Skip to content

Add a certificate chain cache committed after chain verification in the client library #3520

Description

@jpraynaud

Why

We want to update the unstable MithrilCertificateVerifier and CertificateVerifierCache implementations of the client to support a commit mechanism when the full certificate chain is validated. A first FullVerification mode of verification using the cache will verify the cryptography of the cached certificate, thus providing the same level of security than without cache.

What

Implement the new commit mechanism for the client certificate cache and the FullVerification mechanism.

How

  • Update the CertificateVerifierCache trait with:
    • stage_certificate(&self, certificate_chain_validation_id: String, certificate: &CertificateMessage, expiration_at: DateTime) -> MithrilResult<()>
    • commit_staged_certificates(&self, certificate_chain_validation_id: String) -> MithrilResult<()>
    • get_certificate_by_hash(&self, certificate_hash: String) -> MithrilResult<Option<CertificateMessage>>
    • reset(&self) -> MithrilResult<()>
  • Adapt the MemoryCertificateVerifierCache implementation
  • Implement the FullVerification algorithm in verify_chain of the MithrilCertificateVerifier
  • Adapt the ClientBuilder to configure the cache

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions