<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 17, 2019 at 5:17 PM Felipe Gasper <<a href="mailto:felipe@felipegasper.com">felipe@felipegasper.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"></div><div dir="ltr"><br></div><div dir="ltr"><br>On Mar 17, 2019, at 7:55 PM, J Decker <<a href="mailto:d3ck0r@gmail.com" target="_blank">d3ck0r@gmail.com</a>> wrote:<br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 17, 2019 at 4:46 PM Felipe Gasper <<a href="mailto:felipe@felipegasper.com" target="_blank">felipe@felipegasper.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Buffer, not buffet. Silly autocorrect!<br>
<br>
-F<br>
<br>
> On Mar 17, 2019, at 7:21 PM, Felipe Gasper <<a href="mailto:felipe@felipegasper.com" target="_blank">felipe@felipegasper.com</a>> wrote:<br>
> <br>
> Hello,<br>
> <br>
> Is there any equivalent to SSL_CTX_use_certificate_chain_file for a PEM buffet that’s already in memory?<br></blockquote><div>SSL_CTX_use_certificate( ses->ctx, sk_X509_value( ses->cert->chain, 0 ) ); ? </div><div>SSL_CTX_add_extra_chain_cert( ses->ctx, sk_X509_value( ses->cert->chain, n ) );<br></div></div></div></div></div></div></div></blockquote><div><br></div><div>Yeah, but then I have to determine how many certs are in the bundle, parse it, etc. I was hoping to get a function that does all of that in one fell swoop like the ..._file() function.</div><div><br></div><div>I mean, I guess I can copy/paste and tweak for now. Would a refactor in a PR be of interest?</div><div><br></div></div></blockquote><div><br></div><div>that top of this takes the input, uses bio to parse into x509 stack, and then uses the stack setting up the ctx...</div><div><br></div><div><a href="https://github.com/d3x0r/SACK/blob/master/src/netlib/ssl_layer.c#L665-L753">https://github.com/d3x0r/SACK/blob/master/src/netlib/ssl_layer.c#L665-L753</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div></div><div>-FG</div><div><br></div><div><br></div></div></blockquote></div></div></div>