SSL BIO wrappers

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: SSL BIO wrappers
Date: 2008-12-09 15:17:30
Message-ID: 493E8C0A.5000004@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Attached patch replaces the SSL BIO wrapper code we have now, with one
that directly calls the send() and recv() functions instead. THis means
that they get passed through the rewrite macros to our internal
functions on Win32, and I think this will fix some of the strange errors
that seem to be platform specific there (there are some really hard to
reproduce bug reports around that).

They're of course tightly modeled around the code from OpenSSL - found
here: http://cvs.openssl.org/fileview?f=openssl/crypto/bio/bss_sock.c&v=1.15

(functions sock_read and sock_write)

So:

1) Thoughts in general?

2) Per my_sock_write - should we do the prepare read there as well, even
though it's a write? :-)

//Magnus

Attachment Content-Type Size
ssl_bio.patch text/x-diff 3.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-12-09 15:23:09 Re: new libpq SSL connection option
Previous Message Tom Lane 2008-12-09 15:17:29 Re: new libpq SSL connection option