pub struct CertificateAuthority {
pub cert: X509,
pub key: PKey<Private>,
}Expand description
A certificate authority to use for impersonating websites during the man-in-the-middle. The client must trust the given certificate for it to trust the proxy.
Fields§
§cert: X509the certificate authority’s self-signed certificate
key: PKey<Private>the private signing key for the certificate authority
Implementations§
Source§impl CertificateAuthority
impl CertificateAuthority
Sourcepub fn load_from_pem_files<P: AsRef<Path>, Q: AsRef<Path>>(
cert_file: P,
key_file: Q,
) -> Result<Self, Error>
pub fn load_from_pem_files<P: AsRef<Path>, Q: AsRef<Path>>( cert_file: P, key_file: Q, ) -> Result<Self, Error>
Load certificate authority from PEM formatted files. The key file must
not require a passphrase (e.g. was created with the -nodes option on
openssl). NB: There is a bug/behaviour in Mac OS X that prevents opening
unencrypted key files.
Auto Trait Implementations§
impl Freeze for CertificateAuthority
impl RefUnwindSafe for CertificateAuthority
impl Send for CertificateAuthority
impl Sync for CertificateAuthority
impl Unpin for CertificateAuthority
impl UnwindSafe for CertificateAuthority
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more