Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVZo4-0005ca-A2 for pgsql-bugs@arkaria.postgresql.org; Tue, 28 May 2019 10:58:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hVZo1-0003Tn-UK for pgsql-bugs@arkaria.postgresql.org; Tue, 28 May 2019 10:58:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVZo1-0003Tg-MW for pgsql-bugs@lists.postgresql.org; Tue, 28 May 2019 10:58:09 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVZny-0003QD-Q1 for pgsql-bugs@lists.postgresql.org; Tue, 28 May 2019 10:58:09 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C45A622196; Tue, 28 May 2019 06:58:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 28 May 2019 06:58:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=UA0p+yWvrFeedTO3deMy2vjUs2I L9qxGgwK5Mty9ax4=; b=Eh9gvpCY7leyekaAw/PFaSRYyjbGVGzwxycxm4fssLa ZTWvEUhY2D5u2fTpGikvnaBTxf0ElDoc8k1sE4XKnRs1cvttQCko7FTfMW8F/NHQ xo8MARP4RrQ9BHB9PsWxalmsOaivwcMPnK3hOqUw8MlDzFg0wO5jSNiWPGHRilHS g2sWb6CtJTqnYF/55bdfiUOE0asl3NBO5Pn78VLr6FAVdPv0A5zwKmdqr1h096wV +m4f46gyM2GcQvRA8MKgaBSZCrNpiAeTHDQC2EHFjGOTGSOLHW0qTtr4kaa1XqGo TmNzhC3/OsDp9i+L17i623K7yGr4tyhMxs2Uge/+ZxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=UA0p+y WvrFeedTO3deMy2vjUs2IL9qxGgwK5Mty9ax4=; b=Hr9GNil7/wsF8cmFDg+Lyd Ni+dqZv9qrYqulC3yEd1nan+OW6sWRZGhfQNfkpelnKJvbEgF3WNR0RWgJIkPMxZ aeXzVtZOPwCZYjfFRqmYy5Aas29h+0B2ptXn6fnKkXZfrZviczrHqXc3HlT4Qoja fdrfZw0PQ7kbVhveACoDpejflM9tVX0YnZzMtmBvD0Kxa8tYWpE19LvSzyH1pfIX RZ1ThkFuuS4hditQpZ4ZCkg0zldAfYywpS2anUrn3FguyyDn0YVQbufEmD8/I/v1 7F6fQY5i+8ubIOrqX24tauWD3oGcC2BLJtMPgXLjy4Frz8X6hn4fyk+i3+C0230Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddvhedgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlvdefmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt udenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucffohhmrghinhepshhlphhrohifvggsrdgtohhmpdhpohhs thhgrhgvshhqlhdrohhrghenucfkphepfeekrdeigedrudejjedruddvieenucfrrghrrg hmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (unknown [38.64.177.126]) by mail.messagingengine.com (Postfix) with ESMTPA id 0AE80380088; Tue, 28 May 2019 06:58:04 -0400 (EDT) Date: Tue, 28 May 2019 06:58:02 -0400 From: Michael Paquier To: Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha Cc: serpashk@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15789: libpq compilation with OpenSSL 1.1.1b fails on Windows with Visual Studio 2017 Message-ID: <20190528105802.GC2682@paquier.xyz> References: <15789-8fc75dea3c5a17c8@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/e2eDi0V/xtL+Mc8" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --/e2eDi0V/xtL+Mc8 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 28, 2019 at 07:31:55AM +0200, Juan Jos=E9 Santamar=EDa Flecha w= rote: > Can you check if you get a sane compilation with the attached patch? >=20 > It is just a compilation issue, once the software is built with the 1.1.x > libraries you should not have any further problems to use SSL. Could you add your patch to the upcoming commit fest please? Here it is: https://commitfest.postgresql.org/23/ The scripts in src/tools/msvc/ make efforts for being able to compile with OpenSSL 1.0.2 which is the latest LTS version of upstream, but we lack facility to make them more dynamic depending on the version of OpenSSL so as the compile flags of pg_config.h can be enforced correctly. So what you are doing in GetOpenSSLVersion() is something that we are going to need badly, and OpenSSL has broken many interfaces between 1.0.2 and 1.1.0. + # Startint at version 1.1.0 OpenSSL have changed their library names fr= om: + # libeay to libcrypto + # ssleay to libssl s/startint/starting/ Are these from the installers we recommend in the docs? I mean these ones: https://slproweb.com/products/Win32OpenSSL.html + if (-e "$self->{options}->{openssl}/lib/VC/libssl32MD.lib") Why not using a version-specific logic here? + my ($major, $minor) =3D $self->GetOpenSSLVersion(); + if ($major =3D=3D 1 && $minor =3D=3D 1) + { + print $o "#define HAVE_BIO_GET_DATA 1\n"; + print $o "#define HAVE_BIO_METH_NEW 1\n"; + } I think that you are missing HAVE_OPENSSL_INIT_SSL and HAVE_ASN1_STRING_GET0_DATA here. Please see commit message of bde64eb. -- Michael --/e2eDi0V/xtL+Mc8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlztFDoACgkQnvQgOdby QH2dRw//Wyl9lpISvpIaUO2DmFZaqjfx810bvrLVN30LWTfegj1VM31x1cg6+Y7J dQ5uXFUm/g890S0EHszCEv0OIL5iBzR/rk+8rMrQmQd7HbF99erBlNXNYm0wsLYB 6M7tUv6bunTkDKg04XnPc4BFi8O5zTL1KmOvZGMihWwllj2blsTKtY6dnPAfw0IQ EF6DGpG+hwOUa1ZevAKt3oF9sEByJxcX9prfGIbJEekdXfE0Bf196tpC0dam7eWp 09Qwzm3Mp6rs+MP1uKSXqfLiTGzgRwMRXaIl93/LsaGLAIOXo8aMVP7kQFh8PRNb YmUz0B6pTsCe61HO05WmA4G0a3ZfgRorlCDaFY2Cj0SzV7YJuMtWysmqe1be8Ypl k4cnO1C9VKiB4UPVfs/7ToizZQkfTqQ2VTs38W5AsZI/flv+mJuLKaGmL5PrsyF3 JgvhV4bpb/3W1gp3S6Ftkl+IW9lT0ADKHMaPW/oqzV2pSvuaVHzRviDYusIx6OQI 6Nuk0IwfrK9nf7y+ND7mpl0rFp+uFIZbfdbIhYNTrtXbRVEB0d345U4epOvIG1hv i5DmjBJcTQ0YYldIf3Ycn9jl0vPY+L2DZx9aP4R0+hmz2+X1OMSlykWylHKypw1e 747IJa7ZTl4yQ/39blyFBb4P3ujuZK8QLdDy0++orlX5q7luWXo= =QxfB -----END PGP SIGNATURE----- --/e2eDi0V/xtL+Mc8--