Re: OpenSSL 1.1 breaks configure and more

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Christoph Berg <myon(at)debian(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: OpenSSL 1.1 breaks configure and more
Date: 2016-07-02 00:50:43
Message-ID: f4d532f2-daa1-c5a4-67dc-0b6fc9d968d9@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/02/2016 02:45 AM, Andreas Karlsson wrote:
> On 07/02/2016 02:28 AM, Alvaro Herrera wrote:
>> Generally, version number tests sprinkled all over the place are not
>> terribly nice. I think it would be better to get configure to define a
>> symbol like HAVE_BIO_METH_NEW. Not sure about the other hunks in this
>> patch; perhaps HAVE_BIO_SET_DATA, and #define both those macros if not.
>
> Agreed, that it is not nice. I followed what the previous code did, but
> I do not like the inflation of this kind of #ifs with my OpenSSL 1.1
> patches. I will try to see if I can figure out some good symbols.
>
> Essentially the API changes which require ifdefs are:
>
> - Opaque struts (we see an example above with the BIO struct)
> - Renaming of RAND_SSLeay()
> - Deprecation of DH_generate_parameters()
> - Automatic initialization
> - Automatic handling of threading
>
> I do not like the idea of having a define per struct they have made
> opaque in 1.1, but I think one define for all structs could be fine
> (something like HAVE_OPENSSL_OPAQUE_STRUCTS). What do you think?

Looking at my code again I noticed it is just the BIO and BIO_METHOD
structs which needed #ifs. The rest could be handled with changing the
code to work in both old and new versions. If it is just two structs it
might be fine to have two symbols, hm ..

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2016-07-02 02:05:06 Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)
Previous Message Andreas Karlsson 2016-07-02 00:45:04 Re: OpenSSL 1.1 breaks configure and more