aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/auth.c1
-rw-r--r--src/include/common/scram-common.h7
-rw-r--r--src/include/libpq/scram.h7
-rw-r--r--src/interfaces/libpq/fe-auth-scram.c1
-rw-r--r--src/interfaces/libpq/fe-auth.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 19a91ca67d2..b7f9bb1669e 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -26,6 +26,7 @@
#include "commands/user.h"
#include "common/ip.h"
#include "common/md5.h"
+#include "common/scram-common.h"
#include "libpq/auth.h"
#include "libpq/crypt.h"
#include "libpq/libpq.h"
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
diff --git a/src/include/libpq/scram.h b/src/include/libpq/scram.h
index 91f1e0f2c7e..2c245813d65 100644
--- a/src/include/libpq/scram.h
+++ b/src/include/libpq/scram.h
@@ -13,13 +13,6 @@
#ifndef PG_SCRAM_H
#define PG_SCRAM_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"
-
/* Status codes for message exchange */
#define SASL_EXCHANGE_CONTINUE 0
#define SASL_EXCHANGE_SUCCESS 1
diff --git a/src/interfaces/libpq/fe-auth-scram.c b/src/interfaces/libpq/fe-auth-scram.c
index 5b783bc3136..4cad93c24ad 100644
--- a/src/interfaces/libpq/fe-auth-scram.c
+++ b/src/interfaces/libpq/fe-auth-scram.c
@@ -17,7 +17,6 @@
#include "common/base64.h"
#include "common/saslprep.h"
#include "common/scram-common.h"
-#include "libpq/scram.h"
#include "fe-auth.h"
/* These are needed for getpid(), in the fallback implementation */
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index f54ad8e0cc6..2cfdb7c125c 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -39,8 +39,8 @@
#endif
#include "common/md5.h"
+#include "common/scram-common.h"
#include "libpq-fe.h"
-#include "libpq/scram.h"
#include "fe-auth.h"