Why not pass the cert and key data directly and have the TSSslContext created from that? I don't see the advantage of creating a context first, partially populating it, then completing it.
On Tue, Nov 7, 2017 at 8:09 AM, Steven R. Feltner <sfelt...@godaddy.com> wrote: > I would like to propose adding another API call to the TSSslContext series > of API calls. > > tsapi TSSslContext TSSslServerContextComplete((TSSslContext ctx); > > This call will accept a previously create TSSslContext populated with cert > and key data, and will complete the steps necessary for the setup of an > TSSslContext, e.g. setting up SSL Sessions, completing cert chains, etc. > > Here is an example usage: > > TSSslContext ctxobj = TSSslServerContextCreate(); > cert = PEM_read_bio_X509(cbio, NULL, 0, NULL); > SSL_CTX_use_certificate(ctx, cert); > key = PEM_read_bio_PrivateKey(cbio, NULL, NULL, NULL); > SSL_CTX_use_PrivateKey(ctx, key); > TSSslServerContextComplete(ctxobj); > > I will create a PR with the code changes, regression test and > documentation soon. > > Thanks, > Steven >