@@ -142,11 +142,11 @@ where
142
142
{
143
143
match stream. try_next ( ) . await . map_err ( Error :: io) ? {
144
144
Some ( Message :: AuthenticationOk ) => {
145
- no_channel_binding ( config) ?;
145
+ can_skip_channel_binding ( config) ?;
146
146
return Ok ( ( ) ) ;
147
147
}
148
148
Some ( Message :: AuthenticationCleartextPassword ) => {
149
- no_channel_binding ( config) ?;
149
+ can_skip_channel_binding ( config) ?;
150
150
151
151
let pass = config
152
152
. password
@@ -156,7 +156,7 @@ where
156
156
authenticate_password ( stream, pass) . await ?;
157
157
}
158
158
Some ( Message :: AuthenticationMd5Password ( body) ) => {
159
- no_channel_binding ( config) ?;
159
+ can_skip_channel_binding ( config) ?;
160
160
161
161
let user = config
162
162
. user
@@ -194,7 +194,7 @@ where
194
194
}
195
195
}
196
196
197
- fn no_channel_binding ( config : & Config ) -> Result < ( ) , Error > {
197
+ fn can_skip_channel_binding ( config : & Config ) -> Result < ( ) , Error > {
198
198
match config. channel_binding {
199
199
config:: ChannelBinding :: Disable | config:: ChannelBinding :: Prefer => Ok ( ( ) ) ,
200
200
config:: ChannelBinding :: Require => Err ( Error :: authentication (
@@ -258,7 +258,7 @@ where
258
258
None => ( sasl:: ChannelBinding :: unsupported ( ) , sasl:: SCRAM_SHA_256 ) ,
259
259
}
260
260
} else if has_scram {
261
- no_channel_binding ( config) ?;
261
+ can_skip_channel_binding ( config) ?;
262
262
263
263
match channel_binding {
264
264
Some ( _) => ( sasl:: ChannelBinding :: unrequested ( ) , sasl:: SCRAM_SHA_256 ) ,
0 commit comments