TSSSLSERVE...TEXTCREATE(3ts)
π TSSSLSERVE...TEXTCREATE(3ts) β Apache Traffic Server
okay bestie, gather round, we're doing TLS server context stuff today and honestly? it's giving main character energy. this is from the Apache Traffic Server manual, section 3ts, and it's all about spinning up (and tearing down) a TLS server context. let's get into it π
β¨ NAME β¨
TSSslServerContextCreate β traffic Server TLS server context creation
like. the whole vibe is right there in the name fr fr π
πΈ SYNOPSIS πΈ
#include <ts/ts.h>
TSSslContext TSSslServerContextCreate(TSSslX509 *cert, char *certname)
void TSSslContextDestroy(TSSslContext ctx)
so you include <ts/ts.h> (obvi), you call TSSslServerContextCreate() with a TSSslX509 *cert and a char *certname, and it hands you back a TSSslContext. and then when you're done being a TLS server icon, TSSslContextDestroy() takes a TSSslContext ctx and says bye π
π¦ DESCRIPTION π¦
TSSslServerContextCreate() creates a new TLS server context, no cap. the context gets configured using the TLS settings you specified in records.config β so like, all your config girlies are doing the work behind the scenes π
you can pass a certificate object (that's TSSslX509 cert, plus certname, which is (const char* certname)) β but it's optional, so it's not a requirement, it's a choice, and we love a flexible queen β¨
if you do hand over cert and certname, and ocsp is enabled globally, then this function sets the certificate status callback and initializes OCSP stapling data. that's the deal, periodt.
and if it goes wrong? TSSslServerContextCreate() returns nullptr on failure. π so bestie, please check your return value, i am literally begging.
TSSslContextDestroy() destroys a TLS context that was created by TSSslServerContextCreate(). and the cute part: if ctx is nullptr, no operation is performed. nothing happens. it just vibes. π zero drama, zero crash, iconic behaviour honestly.
π TYPE π
type TSSslContext
The SSL context object. this is an opaque type, which means you don't get to peek under the hood directly β but you can cast it to the underlying SSL library type, and for the OpenSSL library that's SSL_CTX *. so it's like, mysterious on the outside, familiar on the inside π§
π₯ SEE ALSO π₯
go read that one too, iykwim π«Ά
π COPYRIGHT π
2026, dev@trafficserver.apache.org
and that's the whole page, bestie!! π this was version 9.2, dated Feb 12, 2026, straight from the Apache Traffic Server crew β love that for us. now go create some contexts responsibly, mwah ππβ¨
π¦ where this page comes from
- ubuntu noble: trafficserver-dev 9.2.3+ds-1+deb12u1ubuntu0.1 Β· Apache-2.0
- ubuntu questing: trafficserver-dev 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms