pub struct GrpcTlsConfig {
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>>,
pub domain_name: Option<String>,
}Expand description
TLS configuration for gRPC 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
domain_name: Option<String>Domain name to use for TLS SNI and certificate validation
Implementations§
Source§impl GrpcTlsConfig
impl GrpcTlsConfig
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_domain_name(self, domain: impl Into<String>) -> Self
pub fn with_domain_name(self, domain: impl Into<String>) -> Self
Set the domain name for TLS SNI and certificate validation
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 GrpcTlsConfig
impl Clone for GrpcTlsConfig
Source§fn clone(&self) -> GrpcTlsConfig
fn clone(&self) -> GrpcTlsConfig
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 GrpcTlsConfig
impl Debug for GrpcTlsConfig
Source§impl Default for GrpcTlsConfig
impl Default for GrpcTlsConfig
Source§fn default() -> GrpcTlsConfig
fn default() -> GrpcTlsConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GrpcTlsConfig
impl RefUnwindSafe for GrpcTlsConfig
impl Send for GrpcTlsConfig
impl Sync for GrpcTlsConfig
impl Unpin for GrpcTlsConfig
impl UnwindSafe for GrpcTlsConfig
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