Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix nightly manual

This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.

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

SSL_set_SSL_CTX() causes ssl to use the context ctx.
If ctx is NULL, ssl reverts to using the context that it was initially created from with SSL_new(3).
If ssl already uses ctx, no action occurs.

RETURN VALUES

SSL_set_SSL_CTX() returns an internal pointer to the context that ssl is using as a result of the call, or NULL if memory allocation fails.

SEE ALSO

ssl(3), SSL_clear(3), SSL_CTX_new(3), SSL_get_SSL_CTX(3), SSL_new(3), SSL_set_security_level(3)

HISTORY

SSL_set_SSL_CTX() first appeared in OpenSSL 0.9.8f and has been available since OpenBSD 4.5.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org