Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 1AC969FBE06 for ; Tue, 5 Jun 2007 10:43:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 28442-01-7 for ; Tue, 5 Jun 2007 10:43:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 6A4FC9FC931 for ; Tue, 5 Jun 2007 10:41:41 -0300 (ADT) Received: (qmail 28805 invoked from network); 5 Jun 2007 22:41:38 +0900 X-Authentication: inoue was authenticated by smtp.tpf.co.jp at 5 Jun 2007 22:41:38 +0900 Received: from unknown (HELO ?192.168.11.3?) (219.61.40.6) by smtp.tpf.co.jp with SMTP; 5 Jun 2007 22:41:38 +0900 Message-ID: <4665680E.60007@tpf.co.jp> Date: Tue, 05 Jun 2007 22:41:34 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Rainer Bauer CC: pgsql-odbc@postgresql.org Subject: Re: [psqlODBC 08.02.0402] OpenSSL libraries References: <452863p8rdgtgmsbshlr1rqrv9m4444dci@4ax.com> <466429A0.1040701@tpf.co.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/16 X-Sequence-Number: 9005 Rainer Bauer wrote: > Hiroshi Inoue wrote: > >> Rainer Bauer wrote: >>> I checked out the latest head version today 08.02.0402 to find a solution for >>> the new OpenSSL DLL naming scheme. >> Do you get OpenSSL libraries from >> http://www.slproweb.com/products/Win32OpenSSL.html ? > > Yes. > >> Though I can find ssleay32(MT]MD)(d).lib in C:\OpenSSL\lib\vc, I can't >> find ssleay32(MT|MD)(d).dll. What's the differnce among ssleay32xx.lib ? > > Sorry this was my fault.: I didn't search for the DLLs installed by OpenSSL. > The difference between /MT and /MD is explained here: > > The /MT option defines _MT whereas the /MD option defines _MT and _DLL > resulting in different runtimes being linked. > > According to the FAQ , psqlODBC > should contain the code for OPENSSL_Applink() (see also Shouldn't it be added to the EXE project not to the DLL one ? > ), because it is > linked with a different setting. But that is not the case! > > So there are a few open questions: > Why is psqlODBC build with /MT and not /MD? Because it has been so without problems. I'm pretty confused. Is it realistic to expect all the relevant dlls and the exe itself are compiled with the same option settings and compiler ? For example, if we build it with /MD otpion using vc8.0, the driver would link msvcr(p)80.dll. OTOH ssleay32.dll downloaded from http://www.slproweb.com/products/Win32OpenSSL.html seems to be linking msvcr71.dll. Is there no problem with it ? > Why are SSL connections working at all (I assume they are, since I cannot test > it here), if the OpenSSL DLLs and psqlODBC are linked to different runtimes? It's not that easy to crash programs with the mixed options and I don't know definite problems to mix the options. OPENSSL_Applink() may be the hint. > Regardless of these issues, my approach would make sense (the DLLs are not > renamed), we just have to include the correct lib files in loadlib.c based on > the installed OpenSSL version: > >>> I wanted to produce a patch for loadlib.c based on the following idea: >>> >>> 1) Include openssl/opensslv.h >>> 2) Based on the version number OPENSSL_VERSION_NUMBER defined in that file >>> either link with ssleay32.lib or ssleay32MT.lib (respectively libeay32.lib or >>> libeay32MT.lib). > > >>> PS: Can someone shed some light why delay loading is used in loadlib.c? >> Because the driver can live without libpq, ssleay32 or pgenlist. >> If you use SSL connections, libpq and ssleay32 are loaded dynamically. >> If you enlist in MSDTC, pgenlist(a) is loaeded dynamically. > > I see. > > Another question: How many active developers are there for Win32? And what > compilers are they using? Dopping support for VC6 would clean up the code (at > least in loadlib.c and the makefile). Please look at http://pgfoundry.org/project/memberlist.php?group_id=1000125. The code is mainly maintained by me. I'm using VC7.1 mainly. AFAIK Hiroshi Saito can use both VC6 and VC8. regards, Hiroshi Inoue