We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a5fdf4 commit ad449bfCopy full SHA for ad449bf
.bleep
@@ -1 +1 @@
1
-f6ec319eff34f641d13b5e1ac0581caad9905e98
+f4e5ae2d44c6e580a5a9a7cc5a80b07c69c95840
pingora-core/src/upstreams/peer.rs
@@ -642,6 +642,17 @@ impl HttpPeer {
642
}
643
644
645
+ /// Create a new [`HttpPeer`] with client certificate and key for mutual TLS.
646
+ pub fn new_mtls<A: ToInetSocketAddrs>(
647
+ address: A,
648
+ sni: String,
649
+ client_cert_key: Arc<CertKey>,
650
+ ) -> Self {
651
+ let mut peer = Self::new(address, true, sni);
652
+ peer.client_cert_key = Some(client_cert_key);
653
+ peer
654
+ }
655
+
656
fn peer_hash(&self) -> u64 {
657
let mut hasher = AHasher::default();
658
self.hash(&mut hasher);
0 commit comments