pub struct HttpTlsConfig {
pub insecure_skip_verify: bool,
pub ca_cert_pem: Option<Vec<u8>>,
pub client_cert_pem: Option<Vec<u8>>,
pub client_key_pem: Option<Vec<u8>>,
}Expand description
TLS configuration for HTTP agent connections
Fields§
§insecure_skip_verify: boolSkip certificate verification (DANGEROUS - only for testing)
ca_cert_pem: Option<Vec<u8>>CA certificate PEM data for verifying the server
client_cert_pem: Option<Vec<u8>>Client certificate PEM data for mTLS
client_key_pem: Option<Vec<u8>>Client key PEM data for mTLS
Implementations§
Source§impl HttpTlsConfig
impl HttpTlsConfig
Sourcepub async fn with_ca_cert_file(
self,
path: impl AsRef<Path>,
) -> Result<Self, Error>
pub async fn with_ca_cert_file( self, path: impl AsRef<Path>, ) -> Result<Self, Error>
Load CA certificate from a file
Sourcepub fn with_ca_cert_pem(self, pem: impl Into<Vec<u8>>) -> Self
pub fn with_ca_cert_pem(self, pem: impl Into<Vec<u8>>) -> Self
Set CA certificate from PEM data
Sourcepub async fn with_client_cert_files(
self,
cert_path: impl AsRef<Path>,
key_path: impl AsRef<Path>,
) -> Result<Self, Error>
pub async fn with_client_cert_files( self, cert_path: impl AsRef<Path>, key_path: impl AsRef<Path>, ) -> Result<Self, Error>
Load client certificate and key from files (for mTLS)
Sourcepub fn with_client_identity(
self,
cert_pem: impl Into<Vec<u8>>,
key_pem: impl Into<Vec<u8>>,
) -> Self
pub fn with_client_identity( self, cert_pem: impl Into<Vec<u8>>, key_pem: impl Into<Vec<u8>>, ) -> Self
Set client certificate and key from PEM data (for mTLS)
Sourcepub fn with_insecure_skip_verify(self) -> Self
pub fn with_insecure_skip_verify(self) -> Self
Skip certificate verification (DANGEROUS - only for testing)
Trait Implementations§
Source§impl Clone for HttpTlsConfig
impl Clone for HttpTlsConfig
Source§fn clone(&self) -> HttpTlsConfig
fn clone(&self) -> HttpTlsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpTlsConfig
impl Debug for HttpTlsConfig
Source§impl Default for HttpTlsConfig
impl Default for HttpTlsConfig
Source§fn default() -> HttpTlsConfig
fn default() -> HttpTlsConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpTlsConfig
impl RefUnwindSafe for HttpTlsConfig
impl Send for HttpTlsConfig
impl Sync for HttpTlsConfig
impl Unpin for HttpTlsConfig
impl UnwindSafe for HttpTlsConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request