Implement Clone for Identity (#1334)

This commit is contained in:
silvioprog
2021-09-29 17:02:03 -03:00
committed by GitHub
parent eb9e343142
commit cf87893b17

View File

@@ -37,11 +37,13 @@ enum Cert {
} }
/// Represents a private key and X509 cert as a client certificate. /// Represents a private key and X509 cert as a client certificate.
#[derive(Clone)]
pub struct Identity { pub struct Identity {
#[cfg_attr(not(any(feature = "native-tls", feature = "__rustls")), allow(unused))] #[cfg_attr(not(any(feature = "native-tls", feature = "__rustls")), allow(unused))]
inner: ClientCert, inner: ClientCert,
} }
#[derive(Clone)]
enum ClientCert { enum ClientCert {
#[cfg(feature = "native-tls")] #[cfg(feature = "native-tls")]
Pkcs12(native_tls_crate::Identity), Pkcs12(native_tls_crate::Identity),