prisma / tiberius

TDS 7.2+ (Microsoft SQL Server) driver for Rust
Apache License 2.0
321 stars 118 forks source link

Support configuring a CA certificates bundle #290

Open main-- opened 1 year ago

main-- commented 1 year ago

The trust_cert_ca() config option configures one specific trusted CA certificate. However, there are two downsides:

The trust_cert_ca_bundle() method implemented here solves both of these issues by taking a bundle of PEM-encoded CA certificates in a Vec and adding all of them to the TLS context. For cases where a CA bundle needs to be loaded from disk, users can of course simply read the file on their end and pass the contents to trust_cert_ca_bundle.