pub struct SqlServerOptions {
pub encryption: Encryption,
pub tls: TlsOptions,
}Expand description
Settings that are specific to SQL Server and have no home in
DatabaseConfig, which is shared with the other drivers.
Fields§
§encryption: Encryption§tls: TlsOptionsImplementations§
Source§impl SqlServerOptions
impl SqlServerOptions
Sourcepub fn from_config(config: &DatabaseConfig) -> SqlServerOptions
pub fn from_config(config: &DatabaseConfig) -> SqlServerOptions
What the connection string asked for.
sslmode was parsed and validated for sqlserver:// URLs and then read
by nobody: every connection used Default, which is “encrypt, and trust
whatever certificate turns up”. Somebody who wrote sslmode=verify-full
got no verification at all, and sslrootcert= was discarded — a silent
downgrade of exactly the kind the other two drivers are careful to avoid.
prefer, the default, keeps the documented compromise: SQL Server
generates a version 1 self-signed certificate at startup that rustls will
not even parse, so verifying by default would refuse every stock
installation. Asking for verification, however, now gets it.
One honest imprecision: verify-ca is served by the same verifier as
verify-full, so it checks the hostname too. That is stricter than the
mode promises rather than weaker, and it is said here rather than left
to be discovered.