7.3.4 patch for libpq SSL_read() problems?

From: Brian Lindauer <jbl-psql-bugs(at)sysd(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: 7.3.4 patch for libpq SSL_read() problems?
Date: 2003-08-22 18:26:29
Message-ID: 1061576789.27425.33.camel@malkmus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

In 7.3.4, calls to PQconsumeInput() hang when connecting over SSL, but
this appears to be fixed at the head of the cvs tree. Is there a patch,
or set of patches, I can apply to 7.3.4 to fix just the SSL problems? I
tried applying the patch to fe-misc.c and fe-secure.c that Tom Lane
posted on August 4, 2003, but I still get the hang. Here's code to
reproduce the bug (though I'm pretty sure this is a known problem).

Thanks,
Brian

#include "libpq-fe.h"

int main(int argc, char **argv)
{
PGconn *conn = NULL;

if (!(conn = PQconnectdb("hostaddr=1.2.3.4 dbname=mydbname
user=myuser")))
{
fprintf(stderr, "Connect failed.\n");
goto error;
}

fprintf(stderr, "Will hang here if broken.\n");
PQconsumeInput(conn);
fprintf(stderr, "Not broken.\n");

PQfinish(conn);
conn = NULL;

return 0;

error:
if (conn)
{
PQfinish(conn);
conn = NULL;
}
return 1;
}

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-08-22 22:02:51 Re: 7.3.4 patch for libpq SSL_read() problems?
Previous Message Tom Lane 2003-08-22 16:21:09 Re: postgresql 7.3.2 bug on date '1901-12-13' and '1901-12