Skip to content

Commit

Permalink
Document ssl-related URL parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbeam committed Jan 31, 2023
1 parent 2b8f082 commit 94bdf23
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/opts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,27 @@ impl Opts {
self.inner.mysql_opts.stmt_cache_size
}

/// Driver will require SSL connection if this opts isn't `None` (default to `None`).
/// Driver will require SSL connection if this opts isn't `None` (defaults to `None`).
///
/// # Connection URL parameters
///
/// Note that for securty reasons:
///
/// * CA and IDENTITY verifications are opt-out
/// * there is no way to give an idenity or root certs via query URL
///
/// URL Parameters:
///
/// * `require_ssl: bool` (defaults to `false`) – requires SSL with default [`SslOpts`]
/// * `verify_ca: bool` (defaults to `true`) – requires server Certificate Authority (CA)
/// certificate validation against the configured CA certificates.
/// Makes no sence if `require_ssl` equals `false`.
/// * `verify_identity: bool` (defaults to `true`) – perform host name identity verification
/// by checking the host name the client uses for connecting to the server against
/// the identity in the certificate that the server sends to the client.
/// Makes no sence if `require_ssl` equals `false`.
///
///
pub fn ssl_opts(&self) -> Option<&SslOpts> {
self.inner.mysql_opts.ssl_opts.as_ref()
}
Expand Down

0 comments on commit 94bdf23

Please sign in to comment.