summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-secure.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-01-08 23:18:25 +0000
committerBruce Momjian <bruce@momjian.us>2003-01-08 23:18:25 +0000
commitb56af49849f3f4f1aa95f31a74dc7ff3a14b575a (patch)
tree8802f00224812b8a8ddd5d567298d1d944b640b0 /src/interfaces/libpq/fe-secure.c
parent6ccb5aebaddd9e7aefaa7d1e7baa3264148be3c5 (diff)
The second was that renegotiation was just plain broken. I can't
believe I didn't notice this before -- once 64k was sent to/from the server the client would crash. Basicly, in 7.3 the server SSL code set the initial state to "about to renegotiate" without actually starting the renegotiation. In addition, the server and client didn't properly handle the SSL_ERROR_WANT_(READ|WRITE) error. This is fixed in the second patch. Nathan Mueller
Diffstat (limited to 'src/interfaces/libpq/fe-secure.c')
-rw-r--r--src/interfaces/libpq/fe-secure.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index 36fe45bd9ca..6a37662321d 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.19 2003/01/08 22:56:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v 1.20 2003/01/08 23:18:25 momjian Exp $
*
* NOTES
* The client *requires* a valid server certificate. Since
@@ -268,6 +268,7 @@ pqsecure_read(PGconn *conn, void *ptr, size_t len)
case SSL_ERROR_NONE:
break;
case SSL_ERROR_WANT_READ:
+ n = pqsecure_read(conn, ptr, len);
break;
case SSL_ERROR_SYSCALL:
if (n == -1)
@@ -314,6 +315,7 @@ pqsecure_write(PGconn *conn, const void *ptr, size_t len)
case SSL_ERROR_NONE:
break;
case SSL_ERROR_WANT_WRITE:
+ n = pqsecure_write(conn, ptr, len);
break;
case SSL_ERROR_SYSCALL:
if (n == -1)