mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-10-01 08:14:06 +02:00
parent
cefb45de22
commit
2af3ee0742
3 changed files with 82 additions and 3 deletions
18
src/nc.rs
18
src/nc.rs
|
|
@ -266,7 +266,23 @@ fn parse_db_options(parsed: &Value) -> Result<Database> {
|
|||
*connect_port = port;
|
||||
}
|
||||
}
|
||||
if disable_ssl {
|
||||
if let Some(ssl_options) = parsed["pgsql_ssl"].clone().into_map() {
|
||||
if let Some(mode) = ssl_options["mode"].as_str() {
|
||||
options.insert("sslmode".into(), mode.into());
|
||||
}
|
||||
if let Some(mode) = ssl_options["cert"].as_str() {
|
||||
options.insert("sslcert".into(), mode.into());
|
||||
}
|
||||
if let Some(mode) = ssl_options["rootcert"].as_str() {
|
||||
options.insert("sslrootcert".into(), mode.into());
|
||||
}
|
||||
if let Some(mode) = ssl_options["key"].as_str() {
|
||||
options.insert("sslkey".into(), mode.into());
|
||||
}
|
||||
if let Some(mode) = ssl_options["crl"].as_str() {
|
||||
options.insert("sslcrl".into(), mode.into());
|
||||
}
|
||||
} else if disable_ssl {
|
||||
options.insert("sslmode".into(), "disable".into());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue