<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">You may need to rename the libraries on your system or use LD_PRELOAD when launching your application.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Another option is to specify the full path to the specific libraries you want when you link with, instead of the -l<library_name>.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For example:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-Tom<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> openssl-users <openssl-users-bounces@openssl.org>
<b>On Behalf Of </b>Kumar Mishra, Sanjeev<br>
<b>Sent:</b> Thursday, May 6, 2021 12:48 AM<br>
<b>To:</b> openssl-users@openssl.org<br>
<b>Cc:</b> Paramashivaiah, Sunil <Sunil.Paramashivaiah@rbbn.com>; Narayana, Sunil Kumar <sanarayana@rbbn.com>; Bhattacharjee, Debapriyo (c) <dbhattacharjee@rbbn.com>; Shivakumar Poojari <Shivakumar.Poojari@rbbn.com><br>
<b>Subject:</b> How to switch between OpenSSL 1.0.2 and 1.1 in compilation loading and linking a C code.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Hi,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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-<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">export LD_LIBRARY_PATH=/sonus/p4/ws/shared/cmn_thirdparty.main/bldtools/toolchain/current/sonus/lib/
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">To compile<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">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<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Both the libcrypto.so.1.0.2 and <span style="background:white"> libcrypto.so.1.1 is present in this path but only picking 1.1 as a default. How to change this default setting?</span><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">Thanks With Best Regards,</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">Sanjeev Kumar Mishra</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><br>
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.<o:p></o:p></p>
</div>
</body>
</html>