Skip to content

Commit

Permalink
added params for ca certs in mssql
Browse files Browse the repository at this point in the history
  • Loading branch information
pangjunrong committed Oct 17, 2024
1 parent 3106e7d commit 8876dad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions connectorx/src/sources/mssql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ pub fn mssql_config(url: &Url) -> Config {
decode(url.password().unwrap_or(""))?.to_owned(),
));

match params.get("trust_server_certificate") {
Some(v) if v.to_lowercase() == "true" => config.trust_cert(),
_ => {},
};

match params.get("trust_server_certificate_ca") {
Some(v) => config.trust_cert_ca(v),
_ => {},
};

match params.get("encrypt") {
Some(v) if v.to_lowercase() == "true" => config.encryption(EncryptionLevel::Required),
_ => config.encryption(EncryptionLevel::NotSupported),
Expand Down

0 comments on commit 8876dad

Please sign in to comment.