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/include/libpq/scram.h | |
parent | af2c5aa88d38573724e40fa029499b4db20b0eb2 (diff) |
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/include/libpq/scram.h')
-rw-r--r-- | src/include/libpq/scram.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/include/libpq/scram.h b/src/include/libpq/scram.h index e373f0c07e8..060b8af69e3 100644 --- a/src/include/libpq/scram.h +++ b/src/include/libpq/scram.h @@ -27,9 +27,7 @@ extern int pg_be_scram_exchange(void *opaq, char *input, int inputlen, char **output, int *outputlen, char **logdetail); /* Routines to handle and check SCRAM-SHA-256 verifier */ -extern char *scram_build_verifier(const char *username, - const char *password, - int iterations); +extern char *pg_be_scram_build_verifier(const char *password); extern bool is_scram_verifier(const char *verifier); extern bool scram_verify_plain_password(const char *username, const char *password, const char *verifier); |