SSL_SET_SSL_CTX(3)

πŸ“¦ version 4.1.0, in opensuse-leap 16.0

πŸ’– SSL_set_SSL_CTX(3) β€” Library Functions Manual πŸ’–

okay bestie, this is the Library Functions Manual page for one tiny but iconic function. no cap, let's get into it πŸ’…

🌸 NAME 🌸

SSL_set_SSL_CTX β€” modify an SSL connection object to use another context

✨ SYNOPSIS ✨

#include <openssl/ssl.h>

SSL_CTX *
SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx);

πŸ¦‹ DESCRIPTION πŸ¦‹

so SSL_set_SSL_CTX() causes ssl to use the context ctx. it's giving "swap the vibe of this connection" energy ✨

if ctx is NULL, then ssl reverts to using the context that it was initially created from with SSL_new(3). yes bestie, it reverts β€” no cap πŸ™ˆ

if ssl already uses ctx, then no action occurs. no action, no drama, periodt πŸ’…

πŸŽ€ RETURN VALUES πŸŽ€

SSL_set_SSL_CTX() returns an internal pointer to the context that ssl is using as a result of the call. iconic.

but if memory allocation fails, it returns NULL. so yeah, watch for that 😭

πŸ”₯ SEE ALSO πŸ”₯

πŸ‘‘ HISTORY πŸ‘‘

SSL_set_SSL_CTX() first appeared in OpenSSL 0.9.8f and has been available since OpenBSD 4.5. history really said "I was there" πŸ’€βœ¨


xoxo, Debian β€” July 13, 2022 β€” page vibes for SSL_set_SSL_CTX(3) πŸ’– mwah

πŸ“¦ where this page comes from