Skip site navigation (1) Skip section navigation (2)

SSL on win32

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Cc: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Subject: SSL on win32
Date: 2004-09-30 21:59:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches

Here is a patch to fix win32 ssl builds. Summary of changes:

* Links with -leay32 and -lssleay32 instead of crypto and ssl. On win32,
"crypto and ssl" is only used for static linking.

* Initializes SSL in the backend and not just in the postmaster. We
cannot pass the SSL context from the postmaster through the parameter
file, because it contains function pointers.

* Split one error check in be-secure.c. Previously we could not tell
which of three calls actually failed. The previous code also returned
incorrect error messages if SSL_accept() failed - that function needs to
use SSL_get_error() on the return value, can't just use the error queue.

* Since the win32 implementation uses non-blocking sockets "behind the
scenes" in order to deliver signals correctly, implements a version of
SSL_accept() that can handle this. Also, add a wait function in case
SSL_read or SSL_write() needs more data.

I'd appreciate it if one of the win32 guys can confirm that this patch
fixes the build for them as well.


Attachment: win32_ssl.patch
Description: application/octet-stream (6.4 KB)


pgsql-patches by date

Next:From: Dave PageDate: 2004-09-30 22:29:34
Subject: Re: SSL on win32
Previous:From: Bruce MomjianDate: 2004-09-30 16:37:39
Subject: consultant

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group