Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
317ce626
Commit
317ce626
authored
Apr 27, 2006
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add underscores to SSL CERT macro names, for clarity and consistency
with be-secure.c.
parent
2882241c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/fe-secure.c
+10
-10
No files found.
src/interfaces/libpq/fe-secure.c
View file @
317ce626
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.7
7 2006/04/27 00:53:58
momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.7
8 2006/04/27 14:01:46
momjian Exp $
*
* NOTES
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
...
...
@@ -122,14 +122,14 @@
#ifdef USE_SSL
#ifndef WIN32
#define USER
CERT
FILE ".postgresql/postgresql.crt"
#define USER
KEY
FILE ".postgresql/postgresql.key"
#define ROOT
CERT
FILE ".postgresql/root.crt"
#define USER
_CERT_
FILE ".postgresql/postgresql.crt"
#define USER
_KEY_
FILE ".postgresql/postgresql.key"
#define ROOT
_CERT_
FILE ".postgresql/root.crt"
#else
/* On Windows, the "home" directory is already PostgreSQL-specific */
#define USER
CERT
FILE "postgresql.crt"
#define USER
KEY
FILE "postgresql.key"
#define ROOT
CERT
FILE "root.crt"
#define USER
_CERT_
FILE "postgresql.crt"
#define USER
_KEY_
FILE "postgresql.key"
#define ROOT
_CERT_
FILE "root.crt"
#endif
#ifdef NOT_USED
...
...
@@ -589,7 +589,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
}
/* read the user certificate */
snprintf
(
fnbuf
,
sizeof
(
fnbuf
),
"%s/%s"
,
homedir
,
USER
CERT
FILE
);
snprintf
(
fnbuf
,
sizeof
(
fnbuf
),
"%s/%s"
,
homedir
,
USER
_CERT_
FILE
);
if
((
fp
=
fopen
(
fnbuf
,
"r"
))
==
NULL
)
{
printfPQExpBuffer
(
&
conn
->
errorMessage
,
...
...
@@ -611,7 +611,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
fclose
(
fp
);
/* read the user key */
snprintf
(
fnbuf
,
sizeof
(
fnbuf
),
"%s/%s"
,
homedir
,
USER
KEY
FILE
);
snprintf
(
fnbuf
,
sizeof
(
fnbuf
),
"%s/%s"
,
homedir
,
USER
_KEY_
FILE
);
if
(
stat
(
fnbuf
,
&
buf
)
==
-
1
)
{
printfPQExpBuffer
(
&
conn
->
errorMessage
,
...
...
@@ -781,7 +781,7 @@ initialize_SSL(PGconn *conn)
/* Set up to verify server cert, if root.crt is present */
if
(
pqGetHomeDirectory
(
homedir
,
sizeof
(
homedir
)))
{
snprintf
(
fnbuf
,
sizeof
(
fnbuf
),
"%s/%s"
,
homedir
,
ROOT
CERT
FILE
);
snprintf
(
fnbuf
,
sizeof
(
fnbuf
),
"%s/%s"
,
homedir
,
ROOT
_CERT_
FILE
);
if
(
stat
(
fnbuf
,
&
buf
)
==
0
)
{
if
(
!
SSL_CTX_load_verify_locations
(
SSL_context
,
fnbuf
,
NULL
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment