mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-10 05:42:02 +08:00
mySQL TLS support (closes #415)
This commit is contained in:
parent
a1930fa0f4
commit
e10083651b
1 changed files with 7 additions and 2 deletions
|
|
@ -55,11 +55,16 @@ impl MysqlStore {
|
|||
}
|
||||
|
||||
if config
|
||||
.property_or_default::<bool>((&prefix, "tls.allow-invalid-certs"), "false")
|
||||
.property_or_default::<bool>((&prefix, "tls.enable"), "false")
|
||||
.unwrap_or_default()
|
||||
{
|
||||
let allow_invalid = config
|
||||
.property_or_default::<bool>((&prefix, "tls.allow-invalid-certs"), "false")
|
||||
.unwrap_or_default();
|
||||
opts = opts.ssl_opts(Some(
|
||||
SslOpts::default().with_danger_accept_invalid_certs(true),
|
||||
SslOpts::default()
|
||||
.with_danger_accept_invalid_certs(allow_invalid)
|
||||
.with_danger_skip_domain_validation(allow_invalid),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue