RE: How to switch between OpenSSL 1.0.2 and 1.1 in compilation loading and linking a C code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You may need to rename the libraries on your system or use LD_PRELOAD when launching your application.

 

Another option is to specify the full path to the specific libraries you want when you link with, instead of the -l<library_name>.

 

For example:

gcc -I /sonus/p4/ws/shared/cmn_thirdparty.main/openssl/distrib/include -L /sonus/p4/ws/shared/cmn_thirdparty.main/bldtools/toolchain/current/sonus/lib/ <PATH_TO>/libssl.so.1.0.2 <PATH_TO>/libcrypto.so.1.0.2 cpxmain1.c -o cpxmain1

 

-Tom

 

From: openssl-users <openssl-users-bounces@xxxxxxxxxxx> On Behalf Of Kumar Mishra, Sanjeev
Sent: Thursday, May 6, 2021 12:48 AM
To: openssl-users@xxxxxxxxxxx
Cc: Paramashivaiah, Sunil <Sunil.Paramashivaiah@xxxxxxxx>; Narayana, Sunil Kumar <sanarayana@xxxxxxxx>; Bhattacharjee, Debapriyo (c) <dbhattacharjee@xxxxxxxx>; Shivakumar Poojari <Shivakumar.Poojari@xxxxxxxx>
Subject: How to switch between OpenSSL 1.0.2 and 1.1 in compilation loading and linking a C code.

 

Hi,

In my Linux Debian server both OpenSSL 1.0.2 and 1.1 is installed. As a user I am compiling C code for 1.0.2. But at the runtime and linking and loading it is picking version 1.1 as default. How to switch between OpenSSL 1.0.2 and 1.1 in compilation loading and linking a C code ? Is there any linux env is required to set? I am using following commands-

 

export LD_LIBRARY_PATH=/sonus/p4/ws/shared/cmn_thirdparty.main/bldtools/toolchain/current/sonus/lib/

To compile

gcc -I /sonus/p4/ws/shared/cmn_thirdparty.main/openssl/distrib/include -L /sonus/p4/ws/shared/cmn_thirdparty.main/bldtools/toolchain/current/sonus/lib/ -lssl -lcrypto cpxmain1.c -o cpxmain1

 

 

Both the libcrypto.so.1.0.2 and  libcrypto.so.1.1 is present in this path but only picking 1.1 as a default. How to change this default setting?

 

Thanks With Best Regards,

Sanjeev Kumar Mishra

 

 


Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. and its Affiliates that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux