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

Reply via email to