use crate::{
collections::Vector,
rng::CryptoRng,
tls::{SignatureScheme, TlsCtx, TlsCtxSk, TlsMode},
};
#[derive(Clone, Copy, Debug, Default)]
pub struct UnverifiedCtx {}
impl UnverifiedCtx {
#[inline]
pub const fn new() -> Self {
Self {}
}
}
impl TlsCtx for UnverifiedCtx {
const TY: TlsMode = TlsMode::Unverified;
}
impl TlsCtxSk for UnverifiedCtx {
type Signature = [u8; 0];
#[inline]
fn sign<RNG>(
&self,
_: &mut Vector<u8>,
_: &[u8],
_: &mut RNG,
_: SignatureScheme,
) -> crate::Result<Self::Signature>
where
RNG: CryptoRng,
{
Ok([])
}
}