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 1ibVe7-00066h-1J for pgsql-committers@arkaria.postgresql.org; Sun, 01 Dec 2019 20:16:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ibVe4-0003P4-Tv for pgsql-committers@arkaria.postgresql.org; Sun, 01 Dec 2019 20:16:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ibVe4-0003Ow-9j for pgsql-committers@lists.postgresql.org; Sun, 01 Dec 2019 20:16:40 +0000 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ibVe0-0002Uu-8f for pgsql-committers@lists.postgresql.org; Sun, 01 Dec 2019 20:16:38 +0000 Received: by mail-yw1-xc43.google.com with SMTP id r131so13093968ywh.2 for ; Sun, 01 Dec 2019 12:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=ts/7jiXzKLf63nE8BuLnFHicjygrvb5EjRHUETTx20g=; b=09J7JyKSSUY6fXi7GmnxmDw6l0o+BX0FGD51o9Pr+5azBynfaiRSi8PNJhRndXJSaW 896yKeLLClj0GpZzApYCDUiJ/+xMuTjlulXdFjc+HS1t5kj3hbfxop1OX2/zOx20fi2Y Bxur37zlGlfqVjcHwHtaplroz5oTWYqmgWZVneuVKw0sGliAUTp5WdKxM1YCv+AMfkOX m7Pq2QiuPrcEFbUZxr0K1ACk+cY+8fsR88smNBW4J5QNBjPQAH6RupakLIKXWlx+Ud4+ PdxijUQJQoUR2wc+YQZd2VnI0GrlEKk48+DI8hebyhpkuWntgjY7tuejeR+FgsMd7wHO qHcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=ts/7jiXzKLf63nE8BuLnFHicjygrvb5EjRHUETTx20g=; b=r0139HfihNgLl6cTrgikp0MFRU6ZGYyg+G+3wrZ3ALX0N5+byXmd+lmz2RQ1d0ftYh pkWKSC5KsEHjz7MBWiw8ubBgzVNg4i9kKW3cso7kr2P3TYM6LsvcnmY5RgP4/xuOFs79 XWXRK77Ib1QqZcziUBNSn/dpeUK4D/byeCblm9PBQZZ16kZzJqrcPYg/b527+O9RG1ev cJ4KOrFkwVfsicyXq2PlgDT6oiLIoyDY1VJGh++psTaOjydBDTItMjBQvhbTqJUZPTQX S9Gep3CJ5QCY+T+9uzWAC3hSQcK7eLg5rPbAR3HFCSyw/yDHF+AnodRCigEkYoF0rC4B cJIA== X-Gm-Message-State: APjAAAX0AFHXf6X9SebF4elCVctrCa2HztAzPng8to2eXmfuQfKENcct /ptb8fAIjApPXltIgvk5VtyLJakNJJKROkmoPfdbWRV/E3jy9gzN9thWhxlWGd4IQaK758yS4Q9 J/MhutasFIOXFmZYL1zSHsFPqDw9CzGCKA581LjeoAB3XUA0CbTu2mp0S3cQJZONm1pIslJ2Yz7 asxh2Vul6HuugggyjOmJNfuZSZ X-Google-Smtp-Source: APXvYqzI2Zhls9NRjQa8xiow/GwE8IhDHuSJrjKnZLN3xUAJqP4pahwLeqnMZkjnJi7d7qyBtyTf+A== X-Received: by 2002:a81:3c95:: with SMTP id j143mr2083969ywa.466.1575231394693; Sun, 01 Dec 2019 12:16:34 -0800 (PST) Received: from [192.168.10.146] (99-10-92-30.lightspeed.rlghnc.sbcglobal.net. [99.10.92.30]) by smtp.gmail.com with ESMTPSA id l6sm6838838ywe.26.2019.12.01.12.16.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Dec 2019 12:16:33 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: libq support for sslpassword connection param, DER format keys To: Michael Paquier , Andrew Dunstan Cc: pgsql-committers@lists.postgresql.org References: <20191201040429.GM2355@paquier.xyz> Openpgp: preference=signencrypt Autocrypt: addr=andrew.dunstan@2ndQuadrant.com; prefer-encrypt=mutual; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNL0FuZHJldyBEdW5zdGFuIDxhbmRyZXcuZHVuc3RhbkAybmRRdWFkcmFudC5jb20+wsCY BBMBAgBCAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgBYhBOQ+WEYd/Hy/RGkVpZn6f8tZ /DuBAhkBBQJd1pSYBQkSzqMsAAoJEJn6f8tZ/DuBJmEIAIVFBIC3qGqh+YTPVTkfowwxpHz0 tZSPjZ6GS/5y62kgoZrZOVXw+Rg2ceuMM3a+In/RRjTx4bembgYqRKgzXlDfiNBJeq5ioVuN H1faDKE2lm5a6QkRQ2JU6DKf60fqSJGP5LisCUr1V0wz6EnlO31ArrKtXCNB+yk0KDAS6o6I Ql4pkXpr+vq4iilwJmiJOqTBam0LmQE7ulYCCYU8Z6MkpiSl+dO7QSramcGyxauQRI3a7gcq dpo8Vrv3gFTQDeMYxk7cqZp08pIVH5XR0+LgBz4X84f59rA/VAKlC/r6CyEQk59rvDLxCMyP 2buoj51Z25N3MVghRDGcsU6mT7fOwE0ETspYWQEIANGc4zQULOxhbqO2dyD51YhqCNRmm9oK Waqf+wmW4tpDe/VVcxAnNizd4LWCHfzpb5cHAtGkOPePMfzWVf6nvdF7d3eglbtf59+zG7O7 llV0xSSoFiieQBsrGvqDInXYX/4mRRXMtyhM353/tixC9RWLs1oofyYmCPPXXY7h9R7en3B8 BoVrRFcdzlIY/NFNhFGW/9dkEiGjgna2Rk6e15kln4ZvFBWUg23p93w/pqXcxY6+k/8TEk+C 4R+M6w7o2PLGOjdZ+kPiUcw5H85zf/yZJwQXzisXaNduwWB6Vads9YC9dj6kPR1c4VGRqAaY L++LAEOqrlvm2TvqQqZRtnEAEQEAAcLAZQQYAQIADwIbDAUCXdaUtAUJEs6jVQAKCRCZ+n/L Wfw7gQi5B/9sHbmRloZNCWWwZGm+O9iG/JGQxS0WWa4GaZqzqSTWOft2/gO0Bgag89r1djq4 PFgSZtzHvKQpqYz/7HkPrWh1jpcS83i/uYY1uyHXUUtpdEmn4buNObEtD0YNaJkGdhASsECq 6akw+u7WJYmAHs/SpR6ok6HqLw7JHDVc2h5dViLfTk0qrgDa7sq/LVMoJje5Ct/Ku3YaWAV6 YSmzoPP5BmPVFqP11OMQkCqurIu9vTLXKFWX623vCmqRDHJ6e5GCDHbH8USU+4wJBfPymZkd cA7NGm/mmWeJiWBFIDyjzYxrjku8ty9TZJVsaRXnS+OFQzXz9Eu2wTpKdHij46uY Message-ID: Date: Sun, 1 Dec 2019 15:16:32 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20191201040429.GM2355@paquier.xyz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/30/19 11:04 PM, Michael Paquier wrote: > Andrew, > > On Sat, Nov 30, 2019 at 08:45:25PM +0000, Andrew Dunstan wrote: >> libq support for sslpassword connection param, DER format keys >> >> This patch providies for support for password protected SSL client >> keys in libpq, and for DER format keys, both encrypted and unencrypted. >> There is a new connection parameter sslpassword, which is supplied to >> the OpenSSL libraries via a callback function. The callback function can >> also be set by an application by calling PQgetSSLKeyPassHook(). There is >> also a function to retreive the connection setting, PQsslpassword(). > Windows build is broken after this commit at link time on most animals: > libpqdll.def : error LNK2001: unresolved external symbol > PQdefaultSSLKeyPassHook > [C:\buildfarm\buildenv\HEAD\pgsql.build\libpq.vcxproj] > libpqdll.def : error LNK2001: unresolved external symbol > PQgetSSLKeyPassHook > [C:\buildfarm\buildenv\HEAD\pgsql.build\libpq.vcxproj] > libpqdll.def : error LNK2001: unresolved external symbol > PQsetSSLKeyPassHook [C:\buildfarm\buildenv\HEAD\pgsql.build\libpq.vcxproj] > > I have not checked the build, but it seems like the indentation in > exports.txt is not right. Your patch has added tabs for the new > entries, but spaces have been used up to now. No, that's not the issue. The problem is that if we're not building with openssl we don't link in fe-secure-openssl.c. It looks like I might need to move some stuff from there to fe-secure.c. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services