summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-auth.c
diff options
context:
space:
mode:
authorPeter Eisentraut2018-01-30 21:50:30 +0000
committerPeter Eisentraut2018-01-30 21:50:30 +0000
commit38d485fdaa5739627b642303cc172acc1487b90a (patch)
tree889f12a0dcbd4c70e2bbd1a26b93a4286a38de25 /src/interfaces/libpq/fe-auth.c
parent99f6a17dd62aa5ed92df7e5c03077ddfc85381c8 (diff)
Fix up references to scram-sha-256
pg_hba_file_rules erroneously reported this as scram-sha256. Fix that. To avoid future errors and confusion, also adjust documentation links and internal symbols to have a separator between "sha" and "256". Reported-by: Christophe Courtois <[email protected]> Author: Michael Paquier <[email protected]>
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
-rw-r--r--src/interfaces/libpq/fe-auth.c8
1 files changed, 4 insertions, 4 deletions
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)