diff options
Diffstat (limited to 'src/interfaces/libpq')
-rw-r--r-- | src/interfaces/libpq/fe-auth-scram.c | 4 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-auth.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/libpq/fe-auth-scram.c b/src/interfaces/libpq/fe-auth-scram.c index 23bd5fb2b61..8415bbb5c61 100644 --- a/src/interfaces/libpq/fe-auth-scram.c +++ b/src/interfaces/libpq/fe-auth-scram.c @@ -349,7 +349,7 @@ build_client_first_message(fe_scram_state *state) /* * First build the gs2-header with channel binding information. */ - if (strcmp(state->sasl_mechanism, SCRAM_SHA256_PLUS_NAME) == 0) + if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) == 0) { Assert(conn->ssl_in_use); appendPQExpBuffer(&buf, "p=%s", conn->scram_channel_binding); @@ -430,7 +430,7 @@ build_client_final_message(fe_scram_state *state) * build_client_first_message(), because the server will check that it's * the same flag both times. */ - if (strcmp(state->sasl_mechanism, SCRAM_SHA256_PLUS_NAME) == 0) + if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) == 0) { char *cbind_data = NULL; size_t cbind_data_len = 0; diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index 7bcbca9df61..3b2073a47fe 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -533,11 +533,11 @@ pg_SASL_init(PGconn *conn, int payloadlen) if (conn->ssl_in_use && conn->scram_channel_binding && strlen(conn->scram_channel_binding) > 0 && - strcmp(mechanism_buf.data, SCRAM_SHA256_PLUS_NAME) == 0) - selected_mechanism = SCRAM_SHA256_PLUS_NAME; - else if (strcmp(mechanism_buf.data, SCRAM_SHA256_NAME) == 0 && + strcmp(mechanism_buf.data, SCRAM_SHA_256_PLUS_NAME) == 0) + selected_mechanism = SCRAM_SHA_256_PLUS_NAME; + else if (strcmp(mechanism_buf.data, SCRAM_SHA_256_NAME) == 0 && !selected_mechanism) - selected_mechanism = SCRAM_SHA256_NAME; + selected_mechanism = SCRAM_SHA_256_NAME; } if (!selected_mechanism) |