<div dir="ltr"><div><div>Thanks Jakob for the hint<br></div>Let me try out the suggested approach. <br><br></div>By the way, Is there any plan to port SSL_CTX_load_verify_mem to openssl?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 9:23 PM, Jakob Bohm <span dir="ltr"><<a href="mailto:jb-openssl@wisemo.com" target="_blank">jb-openssl@wisemo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 20/02/2018 16:38, Devchandra L Meetei wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have been looking for  API like `SSL_CTX_load_verify_mem` which will load<br>
CA[s] from mem buffer.<br>
<br>
Looks like OpenSSL does not have it yet, Is there any other way to work around<br>
this ?<br>
<br>
<br>
</blockquote></span>
I think it can be done step by step, at least in 1.0.x:<br>
<br>
First allocate an empty STACK_OF X509 certificates<br>
<br>
Then loop over your in-memory CA certificates, passing each to d2i_X509, then adding the resulting X509 object to the stack.<br>
<br>
Finally pass that stack as the CA collection to an appropriate SSL_CTX function.<br>
<br>
<br>
Enjoy<br>
<br>
Jakob<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Jakob Bohm, CIO, Partner, WiseMo A/S.  <a href="https://www.wisemo.com" rel="noreferrer" target="_blank">https://www.wisemo.com</a><br>
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10<br>
This public discussion message is non-binding and may contain errors.<br>
WiseMo - Remote Service Management for PCs, Phones and Embedded<br>
<br>
-- <br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/mailma<wbr>n/listinfo/openssl-users</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Warm Regards<br>--Dev<br>OpenPegasus Developer<br><br>"I'm one of those people that think Thomas Edison and the light bulb 
changed the world more than Karl Marx ever did,” Steve Jobs<br></div></div></div>
</div>