You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Steven R. Feltner" <sf...@godaddy.com> on 2017/11/07 14:09:43 UTC

API Proposal - TSSslServerContextComplete

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

Re: API Proposal - TSSslServerContextComplete

Posted by Alan Carroll <so...@oath.com.INVALID>.
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 <sf...@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
>