On Sun, Mar 17, 2019 at 5:17 PM Felipe Gasper <fel...@felipegasper.com> wrote:
> > > On Mar 17, 2019, at 7:55 PM, J Decker <d3c...@gmail.com> wrote: > > > On Sun, Mar 17, 2019 at 4:46 PM Felipe Gasper <fel...@felipegasper.com> > wrote: > >> Buffer, not buffet. Silly autocorrect! >> >> -F >> >> > On Mar 17, 2019, at 7:21 PM, Felipe Gasper <fel...@felipegasper.com> >> wrote: >> > >> > Hello, >> > >> > Is there any equivalent to SSL_CTX_use_certificate_chain_file for a PEM >> buffet that’s already in memory? >> > SSL_CTX_use_certificate( ses->ctx, sk_X509_value( ses->cert->chain, 0 ) ); > ? > SSL_CTX_add_extra_chain_cert( ses->ctx, sk_X509_value( ses->cert->chain, n > ) ); > > > 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. > > I mean, I guess I can copy/paste and tweak for now. Would a refactor in a > PR be of interest? > > that top of this takes the input, uses bio to parse into x509 stack, and then uses the stack setting up the ctx... https://github.com/d3x0r/SACK/blob/master/src/netlib/ssl_layer.c#L665-L753 > -FG > > >