quantcrypt::content

Struct DirectoryCertificateStore

source
pub struct DirectoryCertificateStore { /* private fields */ }
Expand description

Directory-based certificate store.

This is a simple implementation of the CertificateStore trait that uses a directory of certificates.

The directory should contain the certificates of the trust anchors, sub-CAs, and end-entities. The certificates should be in DER or PEM format.

This store will attempt to resolve the recipient’s certificate to a trust anchor certificate by following the certificate chain.

The TA certificates should be self-signed. The EE certificates should be signed by a sub-CA or a TA.

sub-CA certs should be signed by a TA or another sub-CA.

This store does not support CRLs or OCSP and does not check the path length constraints. It is meant for testing and educational purposes only.

For a real-world application, use you can write your own authenticator that implements the CertificateStore trait and can check the CRLs, OCSP, and path length constraints.

Implementations§

source§

impl DirectoryCertificateStore

source

pub fn new(path: &str) -> Result<DirectoryCertificateStore, QuantCryptError>

Create a new directory certificate store.

§Arguments
  • path - The path to the directory containing the certificates.
§Returns

A new DirectoryCertificateStore instance.

Trait Implementations§

source§

impl CertificateStore for DirectoryCertificateStore

source§

fn find(&self, ri: RecipientIdentifier) -> Option<Certificate>

Find a certificate by recipient identifier.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V