diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-05-03 11:19:07 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2017-05-03 11:19:07 +0300 |
commit | 8f8b9be51fd788bb11276df89606bc653163524e (patch) | |
tree | 4d2daef287c2adb74da34bd6fcdbd47febbb47df /src/backend/libpq/crypt.c | |
parent | af2c5aa88d38573724e40fa029499b4db20b0eb2 (diff) | |
download | postgresql-8f8b9be51fd788bb11276df89606bc653163524e.tar.gz postgresql-8f8b9be51fd788bb11276df89606bc653163524e.zip |
Add PQencryptPasswordConn function to libpq, use it in psql and createuser.
The new function supports creating SCRAM verifiers, in addition to md5
hashes. The algorithm is chosen based on password_encryption, by default.
This fixes the issue reported by Jeff Janes, that there was previously
no way to create a SCRAM verifier with "\password".
Michael Paquier and me
Discussion: https://www.postgresql.org/message-id/CAMkU%3D1wfBgFPbfAMYZQE78p%3DVhZX7nN86aWkp0QcCp%3D%2BKxZ%3Dbg%40mail.gmail.com
Diffstat (limited to 'src/backend/libpq/crypt.c')
-rw-r--r-- | src/backend/libpq/crypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index d0030f2b6d8..9fe79b48946 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -156,7 +156,7 @@ encrypt_password(PasswordType target_type, const char *role, switch (guessed_type) { case PASSWORD_TYPE_PLAINTEXT: - return scram_build_verifier(role, password, 0); + return pg_be_scram_build_verifier(password); case PASSWORD_TYPE_MD5: |