From ac6a1d9ce4ce1fd081da6d64638802fa2cd19f7e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 20 Nov 2004 00:35:13 +0000 Subject: [PATCH] Make sure we produce a useful error message for the case where the postgresql.crt file simply isn't there, too. --- src/interfaces/libpq/fe-secure.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 00fddfcf76..ff6d529b5a 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -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, -- 2.39.5