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

Commit317ce62

Browse files
committed
Add underscores to SSL CERT macro names, for clarity and consistency
with be-secure.c.
1 parent2882241 commit317ce62

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.77 2006/04/2700:53:58 momjian Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.78 2006/04/2714:01:46 momjian Exp $
1515
*
1616
* NOTES
1717
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -122,14 +122,14 @@
122122
#ifdefUSE_SSL
123123

124124
#ifndefWIN32
125-
#defineUSERCERTFILE".postgresql/postgresql.crt"
126-
#defineUSERKEYFILE".postgresql/postgresql.key"
127-
#defineROOTCERTFILE".postgresql/root.crt"
125+
#defineUSER_CERT_FILE".postgresql/postgresql.crt"
126+
#defineUSER_KEY_FILE".postgresql/postgresql.key"
127+
#defineROOT_CERT_FILE".postgresql/root.crt"
128128
#else
129129
/* On Windows, the "home" directory is already PostgreSQL-specific */
130-
#defineUSERCERTFILE"postgresql.crt"
131-
#defineUSERKEYFILE"postgresql.key"
132-
#defineROOTCERTFILE"root.crt"
130+
#defineUSER_CERT_FILE"postgresql.crt"
131+
#defineUSER_KEY_FILE"postgresql.key"
132+
#defineROOT_CERT_FILE"root.crt"
133133
#endif
134134

135135
#ifdefNOT_USED
@@ -589,7 +589,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
589589
}
590590

591591
/* read the user certificate */
592-
snprintf(fnbuf,sizeof(fnbuf),"%s/%s",homedir,USERCERTFILE);
592+
snprintf(fnbuf,sizeof(fnbuf),"%s/%s",homedir,USER_CERT_FILE);
593593
if ((fp=fopen(fnbuf,"r"))==NULL)
594594
{
595595
printfPQExpBuffer(&conn->errorMessage,
@@ -611,7 +611,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
611611
fclose(fp);
612612

613613
/* read the user key */
614-
snprintf(fnbuf,sizeof(fnbuf),"%s/%s",homedir,USERKEYFILE);
614+
snprintf(fnbuf,sizeof(fnbuf),"%s/%s",homedir,USER_KEY_FILE);
615615
if (stat(fnbuf,&buf)==-1)
616616
{
617617
printfPQExpBuffer(&conn->errorMessage,
@@ -781,7 +781,7 @@ initialize_SSL(PGconn *conn)
781781
/* Set up to verify server cert, if root.crt is present */
782782
if (pqGetHomeDirectory(homedir,sizeof(homedir)))
783783
{
784-
snprintf(fnbuf,sizeof(fnbuf),"%s/%s",homedir,ROOTCERTFILE);
784+
snprintf(fnbuf,sizeof(fnbuf),"%s/%s",homedir,ROOT_CERT_FILE);
785785
if (stat(fnbuf,&buf)==0)
786786
{
787787
if (!SSL_CTX_load_verify_locations(SSL_context,fnbuf,NULL))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp