mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(core): add one-way TLS support with CA certificate for ArchiPEL UAT environment (#8128)
Co-authored-by: Debarati Ghatak <debarati.ghatak@Debarati-Ghatak-FW569NC29L.local> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -48,6 +48,7 @@ pub struct Request {
|
||||
pub certificate: Option<Secret<String>>,
|
||||
pub certificate_key: Option<Secret<String>>,
|
||||
pub body: Option<RequestContent>,
|
||||
pub ca_certificate: Option<Secret<String>>,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for RequestContent {
|
||||
@ -91,6 +92,7 @@ impl Request {
|
||||
certificate: None,
|
||||
certificate_key: None,
|
||||
body: None,
|
||||
ca_certificate: None,
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,6 +125,7 @@ pub struct RequestBuilder {
|
||||
pub certificate: Option<Secret<String>>,
|
||||
pub certificate_key: Option<Secret<String>>,
|
||||
pub body: Option<RequestContent>,
|
||||
pub ca_certificate: Option<Secret<String>>,
|
||||
}
|
||||
|
||||
impl RequestBuilder {
|
||||
@ -134,6 +137,7 @@ impl RequestBuilder {
|
||||
certificate: None,
|
||||
certificate_key: None,
|
||||
body: None,
|
||||
ca_certificate: None,
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,6 +186,11 @@ impl RequestBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn add_ca_certificate_pem(mut self, ca_certificate: Option<Secret<String>>) -> Self {
|
||||
self.ca_certificate = ca_certificate;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn build(self) -> Request {
|
||||
Request {
|
||||
method: self.method,
|
||||
@ -190,6 +199,7 @@ impl RequestBuilder {
|
||||
certificate: self.certificate,
|
||||
certificate_key: self.certificate_key,
|
||||
body: self.body,
|
||||
ca_certificate: self.ca_certificate,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user