mirror of
https://github.com/postgres/postgres.git
synced 2025-10-18 04:29:09 +03:00
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
This commit is contained in:
@@ -53,4 +53,7 @@ extern void scram_H(const uint8 *str, int len, uint8 *result);
|
||||
extern void scram_ClientKey(const uint8 *salted_password, uint8 *result);
|
||||
extern void scram_ServerKey(const uint8 *salted_password, uint8 *result);
|
||||
|
||||
extern char *scram_build_verifier(const char *salt, int saltlen, int iterations,
|
||||
const char *password);
|
||||
|
||||
#endif /* SCRAM_COMMON_H */
|
||||
|
Reference in New Issue
Block a user