You can easily have multiple LIBRARIES of OpenSSL 1.1 and 3.x on the same system; Ubuntu and Fedora do this, and it’s fairly trivial (i.e. just install the libraries), as the libraries are versioned by default (e.g. libcrypto.so.1.1 and libcrypto.so.3) The problem is the development environment (i.e. header files and default library) as these files all have the same name. You will need to explicitly place the header files in separate locations; but one should be the default. This would mean putting the default in /usr/include/openssl, and the other one in /usr/include/openssl11, for example. (Alternatively, make the default a symlink to the versioned directory.) And then the “simple” name of the libraries, would need to point (symlink) to the correct one: /usr/lib64/libcrypto.so -> /usr/lib64/libcrypto.so.3 /usr/lib64/libssl.so -> /usr/lib64/libssl.so.3 Many software packages offer “—with-openssl” options, and you can specify the OpenSSL library. You could also create scripts that swap the development environment for you: # move to openssl 3 rm /usr/include/openssl ln -s /usr/include/openssl3 /usr/include/openssl rm /usr/lib64/libcrypto.so ln -s /usr/lib64/libcrypto.so.3 /usr/lib64/libcrypto.so rm /usr/lib64/libssl.so ln -s /usr/lib64/libssl.so.3 /usr/lib64/libssl.so I leave it as an exercise to the reader to move to an openssl 1.1 environment. After building, the header files no longer matter, and the versioned library will be used by the executable. So the environment can be swapped around. And yes, having two different versions of libcurl pointing to two different versions of OpenSSL is another issue. You will need to do something similar with libcurl.so to swap between the different (OpenSSL) versions of libcurl, or build it along with your other project, or discover some way to explicitly specify the version of libcurl via a patch or configure option.
--
-Todd Short // todd.short@xxxxxx // "One if by land, two if by sea, three if by the Internet."
|
Attachment:
signature.asc
Description: Message signed with OpenPGP