Re: OpenSSL 1.1 breaks configure and more - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: OpenSSL 1.1 breaks configure and more
Date
Msg-id f4d532f2-daa1-c5a4-67dc-0b6fc9d968d9@proxel.se
Whole thread Raw
In response to Re: OpenSSL 1.1 breaks configure and more  (Andreas Karlsson <andreas@proxel.se>)
List 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



pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: OpenSSL 1.1 breaks configure and more
Next
From: Noah Misch
Date:
Subject: Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)