Skip to content

Commit 8079ed6

Browse files
committed
Check channel binding requirements when unsupported locally
1 parent 7b23059 commit 8079ed6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tokio-postgres/src/connect_raw.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ where
255255
let (channel_binding, mechanism) = if has_scram_plus {
256256
match channel_binding {
257257
Some(channel_binding) => (channel_binding, sasl::SCRAM_SHA_256_PLUS),
258-
None => (sasl::ChannelBinding::unsupported(), sasl::SCRAM_SHA_256),
258+
None => {
259+
can_skip_channel_binding(config)?;
260+
261+
(sasl::ChannelBinding::unsupported(), sasl::SCRAM_SHA_256)
262+
},
259263
}
260264
} else if has_scram {
261265
can_skip_channel_binding(config)?;

0 commit comments

Comments
 (0)