Skip to content

Commit e719591

Browse files
committed
Make sure we produce a useful error message for the case where the
postgresql.crt file simply isn't there, too.
1 parent 7506677 commit e719591

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/interfaces/libpq/fe-secure.c

Lines changed: 1 addition & 4 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.56 2004/11/20 00:18:18 tgl Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.57 2004/11/20 00:35:13 tgl Exp $
1515
*
1616
* NOTES
1717
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -761,7 +761,6 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
761761
int (*cb) () = NULL; /* how to read user password */
762762
char sebuf[256];
763763

764-
765764
if (pqGetpwuid(getuid(), &pwdstr, pwdbuf, sizeof(pwdbuf), &pwd) != 0)
766765
{
767766
printfPQExpBuffer(&conn->errorMessage,
@@ -772,8 +771,6 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
772771
/* read the user certificate */
773772
snprintf(fnbuf, sizeof(fnbuf), "%s/.postgresql/postgresql.crt",
774773
pwd->pw_dir);
775-
if (stat(fnbuf, &buf) == -1)
776-
return 0;
777774
if ((fp = fopen(fnbuf, "r")) == NULL)
778775
{
779776
printfPQExpBuffer(&conn->errorMessage,

0 commit comments

Comments
 (0)