diff options
author | Peter Eisentraut | 2017-12-18 21:59:10 +0000 |
---|---|---|
committer | Peter Eisentraut | 2017-12-18 21:59:48 +0000 |
commit | 25d532698d74f4adb34f013f1a287a0029e31fb1 (patch) | |
tree | 240d7d869e328880726f7c1453652d14ad7890b8 /src/include/common/scram-common.h | |
parent | 53cba77b53f98255bfbba9d2612d1a5685feec52 (diff) |
Move SCRAM-related name definitions to scram-common.h
Mechanism names for SCRAM and channel binding names have been included
in scram.h by the libpq frontend code, and this header references a set
of routines which are only used by the backend. scram-common.h is on
the contrary usable by both the backend and libpq, so getting those
names from there seems more reasonable.
Author: Michael Paquier <[email protected]>
Diffstat (limited to 'src/include/common/scram-common.h')
-rw-r--r-- | src/include/common/scram-common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/common/scram-common.h b/src/include/common/scram-common.h index 0c5ee04f263..857a60e71f4 100644 --- a/src/include/common/scram-common.h +++ b/src/include/common/scram-common.h @@ -15,6 +15,13 @@ #include "common/sha2.h" +/* Name of SCRAM mechanisms per IANA */ +#define SCRAM_SHA256_NAME "SCRAM-SHA-256" +#define SCRAM_SHA256_PLUS_NAME "SCRAM-SHA-256-PLUS" /* with channel binding */ + +/* Channel binding types */ +#define SCRAM_CHANNEL_BINDING_TLS_UNIQUE "tls-unique" + /* Length of SCRAM keys (client and server) */ #define SCRAM_KEY_LEN PG_SHA256_DIGEST_LENGTH |