You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
@@ -40,6 +41,8 @@ use tokio_postgres::{Error, Socket};
40
41
/// path to the directory containing Unix domain sockets. Otherwise, it is treated as a hostname. Multiple hosts
41
42
/// can be specified, separated by commas. Each host will be tried in turn when connecting. Required if connecting
42
43
/// with the `connect` method.
44
+
/// * `sslnegotiation` - TLS negotiation method. If set to `direct`, the client will perform direct TLS handshake, this only works for PostgreSQL 17 and newer.
45
+
/// If set to `postgres`, the default value, it follows original postgres wire protocol to perform the negotiation.
43
46
/// * `hostaddr` - Numeric IP address of host to connect to. This should be in the standard IPv4 address format,
44
47
/// e.g., 172.28.40.9. If your machine supports IPv6, you can also use those addresses.
45
48
/// If this parameter is not specified, the value of `host` will be looked up to find the corresponding IP address,
Copy file name to clipboardExpand all lines: tokio-postgres/src/config.rs
+39Lines changed: 39 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,16 @@ pub enum SslMode {
50
50
Require,
51
51
}
52
52
53
+
/// TLS negotiation configuration
54
+
#[derive(Debug,Copy,Clone,PartialEq,Eq)]
55
+
#[non_exhaustive]
56
+
pubenumSslNegotiation{
57
+
/// Use PostgreSQL SslRequest for Ssl negotiation
58
+
Postgres,
59
+
/// Start Ssl handshake without negotiation, only works for PostgreSQL 17+
60
+
Direct,
61
+
}
62
+
53
63
/// Channel binding configuration.
54
64
#[derive(Debug,Copy,Clone,PartialEq,Eq)]
55
65
#[non_exhaustive]
@@ -106,6 +116,8 @@ pub enum Host {
106
116
/// path to the directory containing Unix domain sockets. Otherwise, it is treated as a hostname. Multiple hosts
107
117
/// can be specified, separated by commas. Each host will be tried in turn when connecting. Required if connecting
108
118
/// with the `connect` method.
119
+
/// * `sslnegotiation` - TLS negotiation method. If set to `direct`, the client will perform direct TLS handshake, this only works for PostgreSQL 17 and newer.
120
+
/// If set to `postgres`, the default value, it follows original postgres wire protocol to perform the negotiation.
109
121
/// * `hostaddr` - Numeric IP address of host to connect to. This should be in the standard IPv4 address format,
110
122
/// e.g., 172.28.40.9. If your machine supports IPv6, you can also use those addresses.
111
123
/// If this parameter is not specified, the value of `host` will be looked up to find the corresponding IP address,