Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit25d5326

Browse files
committed
Move SCRAM-related name definitions to scram-common.h
Mechanism names for SCRAM and channel binding names have been includedin scram.h by the libpq frontend code, and this header references a setof routines which are only used by the backend. scram-common.h is onthe contrary usable by both the backend and libpq, so getting thosenames from there seems more reasonable.Author: Michael Paquier <michael.paquier@gmail.com>
1 parent53cba77 commit25d5326

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

‎src/backend/libpq/auth.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include"commands/user.h"
2727
#include"common/ip.h"
2828
#include"common/md5.h"
29+
#include"common/scram-common.h"
2930
#include"libpq/auth.h"
3031
#include"libpq/crypt.h"
3132
#include"libpq/libpq.h"

‎src/include/common/scram-common.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515

1616
#include"common/sha2.h"
1717

18+
/* Name of SCRAM mechanisms per IANA */
19+
#defineSCRAM_SHA256_NAME "SCRAM-SHA-256"
20+
#defineSCRAM_SHA256_PLUS_NAME "SCRAM-SHA-256-PLUS"/* with channel binding */
21+
22+
/* Channel binding types */
23+
#defineSCRAM_CHANNEL_BINDING_TLS_UNIQUE "tls-unique"
24+
1825
/* Length of SCRAM keys (client and server) */
1926
#defineSCRAM_KEY_LENPG_SHA256_DIGEST_LENGTH
2027

‎src/include/libpq/scram.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
#ifndefPG_SCRAM_H
1414
#definePG_SCRAM_H
1515

16-
/* Name of SCRAM mechanisms per IANA */
17-
#defineSCRAM_SHA256_NAME "SCRAM-SHA-256"
18-
#defineSCRAM_SHA256_PLUS_NAME "SCRAM-SHA-256-PLUS"/* with channel binding */
19-
20-
/* Channel binding types */
21-
#defineSCRAM_CHANNEL_BINDING_TLS_UNIQUE"tls-unique"
22-
2316
/* Status codes for message exchange */
2417
#defineSASL_EXCHANGE_CONTINUE0
2518
#defineSASL_EXCHANGE_SUCCESS1

‎src/interfaces/libpq/fe-auth-scram.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include"common/base64.h"
1818
#include"common/saslprep.h"
1919
#include"common/scram-common.h"
20-
#include"libpq/scram.h"
2120
#include"fe-auth.h"
2221

2322
/* These are needed for getpid(), in the fallback implementation */

‎src/interfaces/libpq/fe-auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
#endif
4040

4141
#include"common/md5.h"
42+
#include"common/scram-common.h"
4243
#include"libpq-fe.h"
43-
#include"libpq/scram.h"
4444
#include"fe-auth.h"
4545

4646

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp