|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.181 2001/11/11 02:09:05 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.182 2002/03/02 00:49:22 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -309,7 +309,8 @@ PQconnectStart(const char *conninfo) |
309 | 309 | conn->pgpass=tmp ?strdup(tmp) :NULL; |
310 | 310 | #ifdefUSE_SSL |
311 | 311 | tmp=conninfo_getval(connOptions,"requiressl"); |
312 | | -conn->require_ssl=tmp ? (tmp[0]=='1' ? true : false) : false; |
| 312 | +if (tmp&&tmp[0]=='1') |
| 313 | +conn->require_ssl= true; |
313 | 314 | #endif |
314 | 315 |
|
315 | 316 | /* |
@@ -504,8 +505,6 @@ PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, |
504 | 505 | #ifdefUSE_SSL |
505 | 506 | if ((tmp=getenv("PGREQUIRESSL"))!=NULL) |
506 | 507 | conn->require_ssl= (tmp[0]=='1') ? true : false; |
507 | | -else |
508 | | -conn->require_ssl=0; |
509 | 508 | #endif |
510 | 509 |
|
511 | 510 | if (error) |
@@ -871,6 +870,11 @@ connectDBStart(PGconn *conn) |
871 | 870 | { |
872 | 871 | UNIXSOCK_PATH(conn->raddr.un,portno,conn->pgunixsocket); |
873 | 872 | conn->raddr_len=UNIXSOCK_LEN(conn->raddr.un); |
| 873 | +#ifdefUSE_SSL |
| 874 | +/* Don't bother requesting SSL over a Unix socket */ |
| 875 | +conn->allow_ssl_try= false; |
| 876 | +conn->require_ssl= false; |
| 877 | +#endif |
874 | 878 | } |
875 | 879 | #endif |
876 | 880 |
|
|