]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Make sure we produce a useful error message for the case where the
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Nov 2004 00:35:13 +0000 (00:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Nov 2004 00:35:13 +0000 (00:35 +0000)
postgresql.crt file simply isn't there, too.

src/interfaces/libpq/fe-secure.c

index 0e09a9941e01d283038e5c2b325439ebf2229de7..6b8d98001d6f6640d933c4637778820e7bec0c7c 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.56 2004/11/20 00:18:18 tgl Exp $
+ *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.57 2004/11/20 00:35:13 tgl Exp $
  *
  * NOTES
  *       [ 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)
        int                     (*cb) () = NULL;        /* how to read user password */
        char            sebuf[256];
 
-
        if (pqGetpwuid(getuid(), &pwdstr, pwdbuf, sizeof(pwdbuf), &pwd) != 0)
        {
                printfPQExpBuffer(&conn->errorMessage,
@@ -772,8 +771,6 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
        /* read the user certificate */
        snprintf(fnbuf, sizeof(fnbuf), "%s/.postgresql/postgresql.crt",
                         pwd->pw_dir);
-       if (stat(fnbuf, &buf) == -1)
-               return 0;
        if ((fp = fopen(fnbuf, "r")) == NULL)
        {
                printfPQExpBuffer(&conn->errorMessage,