TS_RESP_CTX_NEW(3ossl)

πŸ’– TS_RESP_CTX_NEW πŸ’–

okay so bestie, welcome to the 3ossl page for the OpenSSL crew's timestamp response context functions πŸ’… this is where you get yourself a shiny new TS_RESP_CTX to play with, so let's go


✨ NAME ✨

TS_RESP_CTX_new_ex, TS_RESP_CTX_new, TS_RESP_CTX_free β€” the whole girlboss trio for making and yeeting a timestamp response context object πŸŽ€


🌸 SYNOPSIS 🌸

#include <openssl/ts.h>

TS_RESP_CTX *TS_RESP_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
TS_RESP_CTX *TS_RESP_CTX_new(void);
void TS_RESP_CTX_free(TS_RESP_CTX *ctx);

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, the whole point: this makes a response context that you can then use for generating responses. That's the vibe ✨

TS_RESP_CTX_new_ex() allocates and initializes a TS_RESP_CTX structure, and it lets you pass in a library context of libctx and a property query of propq. Those two cuties are how you pick which providers supply the algorithms that get fetched later on πŸ‘‘

TS_RESP_CTX_new() is literally the same thing but it sets the library context and property query to NULL. Which means the default (NULL) library context is what gets used for any operations that need algorithm fetches. simple as that, no notes 🫢

TS_RESP_CTX_free() frees the TS_RESP_CTX object ctx. And if the argument is NULL? Nothing happens. Nothing. It just minds its own business πŸ’€ no crash, no drama, we love a safe cleanup function fr fr


🌈 RETURN VALUES 🌈

If the allocation fails, both TS_RESP_CTX_new_ex() and TS_RESP_CTX_new() return NULL. 😭

Otherwise? They return a pointer to the newly allocated structure. slay βœ¨πŸ‘‘

lowkey important: always check for that NULL, bestie. the allocation failing is not a vibe.

⭐ HISTORY ⭐

TS_RESP_CTX_new_ex() was added in OpenSSL 3.0. it's the new girl in town πŸŽ€


Copyright 2021-2024 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page, bestie πŸ’œ go forth and make your timestamp response contexts, you're gonna ate this

mwah πŸ’‹ β€” this was 3ossl, version 3.5.9, dated 2026-09-29. see u next manpage πŸ¦‹

πŸ“¦ where this page comes from