<html><body>
<p><font size="2" face="sans-serif">Thanks to you all,</font><br>
<br>
<font size="2" face="sans-serif">So, I understand that when I am adding cert to the store, I should explicilty increment the count using CRYPTO_add, so that when I X509_STORE_free(), it doesn't delete my cert. This should be enough. </font><br>
<br>
<font size="2" face="sans-serif">Thanks & Regards,<br>
Nayna Jain</font><br>
<br>
<img width="16" height="16" src="cid:1__=EABBF4F2DF9119D68f9e8a93df938@in.ibm.com" border="0" alt="Inactive hide details for Thulasi Goriparthi ---06/10/2015 06:57:55 PM---On 10 June 2015 at 18:45, Viktor Dukhovni <openssl-use"><font size="2" color="#424282" face="sans-serif">Thulasi Goriparthi ---06/10/2015 06:57:55 PM---On 10 June 2015 at 18:45, Viktor Dukhovni <openssl-users@dukhovni.org> wrote:</font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:      </font><font size="1" face="sans-serif">Thulasi Goriparthi <thulasi.goriparthi@gmail.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">"openssl-users@openssl org" <openssl-users@openssl.org></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:      </font><font size="1" face="sans-serif">06/10/2015 06:57 PM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:   </font><font size="1" face="sans-serif">Re: [openssl-users] X509_STORE_free() and X509_LOOKUP_free() also frees the X509 certificates inside it</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Sent by:   </font><font size="1" face="sans-serif">"openssl-users" <openssl-users-bounces@openssl.org></font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<br>
<br>
<font size="3" face="serif">On 10 June 2015 at 18:45, Viktor Dukhovni <</font><a href="mailto:openssl-users@dukhovni.org" target="_blank"><font size="3" color="#0000FF" face="serif"><u>openssl-users@dukhovni.org</u></font></a><font size="3" face="serif">> wrote:</font>
<ul style="padding-left: 9pt"><font size="3" face="serif">On Wed, Jun 10, 2015 at 04:11:45PM +0530, Thulasi Goriparthi wrote:<br>
<br>
> Jakob is saying that if you want them to stay even after X509_STORE_free,<br>
> explicitly increment the ref count before calling free using something like<br>
> below.<br>
><br>
> CRYPTO_add(certificate->references, 1, CRYPTO_LOCK_X509);<br>
<br>
That should be:<br>
<br>
    CRYPTO_add(&certificate->references, 1, CRYPTO_LOCK_X509);<br>
<br>
the references parameter should be a pointer.</font></ul>
<font size="3" face="serif"><br>
Thank you for the correction. <br>
</font>
<ul style="padding-left: 9pt"><font size="3" color="#888888" face="serif"><br>
--<br>
        Viktor.</font><br>
<font size="3" face="serif">_______________________________________________<br>
openssl-users mailing list<br>
To unsubscribe: </font><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank"><font size="3" color="#0000FF" face="serif"><u>https://mta.openssl.org/mailman/listinfo/openssl-users</u></font></a></ul>
<tt><font size="2">_______________________________________________<br>
openssl-users mailing list<br>
To unsubscribe: </font></tt><tt><font size="2"><a href="https://mta.openssl.org/mailman/listinfo/openssl-users">https://mta.openssl.org/mailman/listinfo/openssl-users</a></font></tt><tt><font size="2"><br>
</font></tt><br>
</body></html>