Re: Bug #838: SSL problems in 7.3

From: Nathan Mueller <nmueller(at)cs(dot)wisc(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #838: SSL problems in 7.3
Date: 2002-12-10 20:52:38
Message-ID: 200212102052.OAA06164@norm.cs.wisc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ok, I tested this out with TLSv1 and it worked fine. I found that the
same mistake was being made on the client side of things too so I
included a patch for that too.

--Nate

Index: src/backend/libpq/be-secure.c
===================================================================
RCS file: /s/postgresql-7.3.0/src/CVSROOT/postgresql-7.3.0/src/backend/-
libpq/be-secure.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 be-secure.c
--- src/backend/libpq/be-secure.c 2 Dec 2002 03:33:36 -0000 1.1.1.1
+++ src/backend/libpq/be-secure.c 10 Dec 2002 20:23:30 -0000
@@ -288,7 +288,8 @@
case SSL_ERROR_WANT_READ:
break;
case SSL_ERROR_SYSCALL:
- elog(ERROR, "SSL SYSCALL error: %s",
strerror(errno));
+ if (n == -1)
+ elog(ERROR, "SSL SYSCALL error: %s",
strerror(errno));
break;
case SSL_ERROR_SSL:
elog(ERROR, "SSL error: %s",
SSLerrmessage());
Index: src/interfaces/libpq/fe-secure.c
===================================================================
RCS file: /s/postgresql-7.3.0/src/CVSROOT/postgresql-7.3.0/src/interfac-
es/libpq/fe-secure.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fe-secure.c
--- src/interfaces/libpq/fe-secure.c 2 Dec 2002 03:33:51 -0000 1.1.1.1
+++ src/interfaces/libpq/fe-secure.c 10 Dec 2002 20:24:36 -0000
@@ -270,7 +270,8 @@
case SSL_ERROR_WANT_READ:
break;
case SSL_ERROR_SYSCALL:
- printfPQExpBuffer(&conn->errorMessage,
+ if (n == -1)
+ printfPQExpBuffer(&conn->err-
orMessage,
libpq_g-
ettext(-
"SSL
SYSCALL
error:
%s\n"),
SOCK_-
STRER-
ROR(S-
OCK_E-
RRNO)-
);
break;
@@ -315,7 +316,8 @@
case SSL_ERROR_WANT_WRITE:
break;
case SSL_ERROR_SYSCALL:
- printfPQExpBuffer(&conn->errorMessage,
+ if (n == -1)
+ printfPQExpBuffer(&conn->err-
orMessage,
libpq_g-
ettext(-
"SSL
SYSCALL
error:
%s\n"),
SOCK_-
STRER-
ROR(S-
OCK_E-
RRNO)-
);
break;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-12-10 20:58:20 Re: Bug #838: SSL problems in 7.3
Previous Message Nathan Mueller 2002-12-10 20:09:50 Re: Bug #838: SSL problems in 7.3