Skip to main content

AteccProvider

Struct AteccProvider 

Source
pub struct AteccProvider<'a, M: RawMutex, PHY, const CERT_SIZE: usize = 0> { /* private fields */ }

Implementations§

Source§

impl<'a, M: RawMutex, PHY> AteccProvider<'a, M, PHY, 0>

Source

pub fn new( atca: &'a AtCaClient<M, PHY>, sign_key: Slot, ca_pubkey_source: impl Into<RootCaSource>, ) -> Self

Source

pub fn new_unverified(atca: &'a AtCaClient<M, PHY>, sign_key: Slot) -> Self

Create a provider that skips server certificate verification.

Useful for development, testing, or connecting to servers with self-signed certificates. Not recommended for production use.

Source

pub fn with_client_cert<const N: usize>( self, cert: impl Into<CertSource<'a>>, ) -> AteccProvider<'a, M, PHY, N>

Enable client certificate authentication for mutual TLS.

CERT_SIZE controls the temporary stack buffer used when reconstructing a compressed certificate, or copying a DER certificate.

Trait Implementations§

Source§

impl<'a, M, PHY, const CERT_SIZE: usize> CryptoProvider for AteccProvider<'a, M, PHY, CERT_SIZE>
where M: RawMutex, PHY: I2c,

Source§

type CipherSuite = Aes128GcmSha256

Source§

type Signature = Signature<NistP256>

Source§

fn rng(&mut self) -> impl CryptoRngCore

Source§

fn verifier( &mut self, ) -> Result<&mut impl TlsVerifier<Self::CipherSuite>, TlsError>

Source§

fn signer( &mut self, ) -> Result<(impl SignerMut<Self::Signature>, SignatureScheme), TlsError>

Provide a signing key for client certificate authentication. Read more
Source§

fn client_cert(&mut self) -> Option<Certificate<impl AsRef<[u8]>>>

Resolve the client certificate for mutual TLS authentication. Read more

Auto Trait Implementations§

§

impl<'a, M, PHY, const CERT_SIZE: usize = 0> !RefUnwindSafe for AteccProvider<'a, M, PHY, CERT_SIZE>

§

impl<'a, M, PHY, const CERT_SIZE: usize = 0> !UnwindSafe for AteccProvider<'a, M, PHY, CERT_SIZE>

§

impl<'a, M, PHY, const CERT_SIZE: usize> Forget for AteccProvider<'a, M, PHY, CERT_SIZE>

§

impl<'a, M, PHY, const CERT_SIZE: usize> Freeze for AteccProvider<'a, M, PHY, CERT_SIZE>
where &'a AtCaClient<M, PHY>: Freeze, Verifier<'a, M, PHY>: Freeze,

§

impl<'a, M, PHY, const CERT_SIZE: usize> Move for AteccProvider<'a, M, PHY, CERT_SIZE>

§

impl<'a, M, PHY, const CERT_SIZE: usize> Send for AteccProvider<'a, M, PHY, CERT_SIZE>
where &'a AtCaClient<M, PHY>: Send, Verifier<'a, M, PHY>: Send,

§

impl<'a, M, PHY, const CERT_SIZE: usize> Sync for AteccProvider<'a, M, PHY, CERT_SIZE>
where &'a AtCaClient<M, PHY>: Sync, Verifier<'a, M, PHY>: Sync,

§

impl<'a, M, PHY, const CERT_SIZE: usize> Unpin for AteccProvider<'a, M, PHY, CERT_SIZE>
where &'a AtCaClient<M, PHY>: Unpin, Verifier<'a, M, PHY>: Unpin,

§

impl<'a, M, PHY, const CERT_SIZE: usize> UnsafeUnpin for AteccProvider<'a, M, PHY, CERT_SIZE>
where &'a AtCaClient<M, PHY>: UnsafeUnpin, Verifier<'a, M, PHY>: UnsafeUnpin,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.