TSSSLSERVE...TEXTCREATE(3ts)

πŸ“¦
version 9.2.5 Β· 4 versions
, in ubuntu noble, ubuntu questing

πŸ’… 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 🫢


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