martinrotter / textosaurus

Cross-platform text editor based on Qt and Scintilla.
GNU General Public License v3.0
284 stars 44 forks source link

libtextosaurus: Fix compatibility with old OpenSSL #62

Closed shawnanastasio closed 5 years ago

shawnanastasio commented 5 years ago

The OpenSSL_version() function was introduced in OpenSSL 1.1.0. In earlier versions, SSLeay_version() has to be used. This commit uses the proper function depending on the library version.

martinrotter commented 5 years ago

Are there any extra API differences between openssl 1.0 and openssl 1.1? Because I plan to directly call openssl API functions on several places and I would like to avoid polutting code with #ifdefs. Preferably, I would like to use openssl 1.1, but I if there are no differences in APIs, I might support 1.0 as well.

So I mean. Which openssl to choose? I really do not know. My impression was that openssl 1.1 will be more futureproof solution. Am I wrong?

shawnanastasio commented 5 years ago

The EVP library which provides high-level cryptographic functions seems to be mostly the same between 1.1 and 1.0.

It seems quite possible to only use a subset of the API that is compatible across both versions.

martinrotter commented 5 years ago

In that case, I will merge this and make some other adjustments to make everything smoother. Thank you.