Skip to main content

MitmCa

Struct MitmCa 

Source
pub struct MitmCa { /* private fields */ }
Expand description

Ephemeral per-VM Root CA and leaf certificate cache for transparent host-side --mitm-tls.

Implementations§

Source§

impl MitmCa

Source

pub fn generate(insecure_upstream: bool) -> Result<Arc<Self>>

Generate a fresh ephemeral ECDSA P-256 Root CA for this VM session.

Source

pub fn ca_cert_pem(&self) -> &str

Root CA certificate in PEM format (installed into the disposable guest trust store).

Source

pub fn start_session(&self, sni_or_ip: &str) -> Result<MitmSession>

Create a Sans-I/O duplex MitmSession for a new guest TLS connection.

Auto Trait Implementations§

§

impl !Freeze for MitmCa

§

impl !RefUnwindSafe for MitmCa

§

impl !UnwindSafe for MitmCa

§

impl Forget for MitmCa

§

impl Move for MitmCa

§

impl Send for MitmCa
where RawVecInner: Send, &'static [u8]: Send, NonZero<i32>: Send, RawTable<(DnType, DnValue)>: Send, &'static Algorithm: Send, &'static EcdsaSigningAlgorithm: Send, BoxRaw<[u64]>: Send, NonZero<u64>: Send, BoxRaw<[u8]>: Send, &'static dyn RsaEncoding: Send, BoxRaw<dyn RemoteKeyPair + Send + Sync>: Send, &'static SignatureAlgorithm: Send, Mutex<HashMap<String, Arc<ServerConfig>>>: Send, Arc<ClientConfig>: Send, Arc<CryptoProvider>: Send,

§

impl Sync for MitmCa
where RawVecInner: Sync, NonZero<i32>: Sync, RawTable<(DnType, DnValue)>: Sync, BoxRaw<[u64]>: Sync, NonZero<u64>: Sync, BoxRaw<[u8]>: Sync, BoxRaw<dyn RemoteKeyPair + Send + Sync>: Sync, Mutex<HashMap<String, Arc<ServerConfig>>>: Sync, Arc<ClientConfig>: Sync, Arc<CryptoProvider>: Sync,

§

impl Unpin for MitmCa
where *const u8 is !null: Unpin, &'static [u8]: Unpin, NonZero<i32>: Unpin, &'static Algorithm: Unpin, &'static EcdsaSigningAlgorithm: Unpin, Box<[u64]>: Unpin, NonZero<u64>: Unpin, Box<[u8]>: Unpin, &'static dyn RsaEncoding: Unpin, Box<dyn RemoteKeyPair + Send + Sync>: Unpin, &'static SignatureAlgorithm: Unpin, Align4<u32>: Unpin, Align1<u8>: Unpin, Arc<ServerConfig>: Unpin, Arc<ClientConfig>: Unpin, Arc<CryptoProvider>: Unpin,

§

impl UnsafeUnpin for MitmCa

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.