Re: OpenSSL Applink - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: OpenSSL Applink
Date
Msg-id 46FD68BB.6020804@hagander.net
Whole thread Raw
In response to Re: OpenSSL Applink  (Dave Page <dpage@postgresql.org>)
Responses Re: OpenSSL Applink
List pgsql-patches
Dave Page wrote:
> Dave Page wrote:
>> Dave Page wrote:
>>> I did stumble across this text on a mailing list in response to someone
>>> with a similar problem in some JNI code. I know little of the OpenSSL
>>> API, but perhaps it rings bells with you before I spend my evening
>>> trying to figure it out?
>> OK, I think I've figured out a fix. Working up a patch now...
>
> Patch attached.

(sorry, been offline for the day)

Is there any reason not to just do this on *all* platforms, and get rid
of all the #ifdefs?

The new code actually seems cleaner to me than what we did before,
really... Since it lets OpenSSL do all the work for it.


> It appears to work fine except that if the client certificate is
> missing, instead of:
>
> could not open certificate file "C:\Documents and
> Settings\Dave\Application Data/postgresql/postgresql.crt": No such file
> or directory
>
> I get:
>
> Error connecting to the server: SSL SYSCALL error: Operation would block
> (0x00002733/10035)
>
> for reasons that are not clear to me. Any ideas?

I wonder if it might be related to our socket/signal emulation stuff.
I'd be interested to see what happens with the same code on Unix, but
sorry, don't have time to test myself - will be offline again tomorrow :-(

//Magnus


pgsql-patches by date:

Previous
From: Hannes Eder
Date:
Subject: msvc >= VC7 understands __FUNCTION__
Next
From: Dave Page
Date:
Subject: Re: OpenSSL Applink