---
name: "SSL_CONF_CTX_set_ssl_ctx"
section: "3ssl"
platform: "linux"
package: "openssl"
version: "3.6.5-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/SSL_CONF_CTX_set_ssl_ctx"
---

# SSL\_CONF\_CTX\_set\_ssl\_ctx(3ssl)

set context to configure

## NAME

SSL\_CONF\_CTX\_finish, SSL\_CONF\_CTX\_set\_ssl\_ctx, SSL\_CONF\_CTX\_set\_ssl - set context to configure

## SYNOPSIS

```
 #include <openssl/ssl.h>
 void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx);
 void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl);
 int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx);
```

## DESCRIPTION

**SSL\_CONF\_CTX\_set\_ssl\_ctx()** sets the context associated with **cctx** to the **SSL\_CTX** structure **ctx**. Any previous **SSL** or **SSL\_CTX** associated with **cctx** is cleared. Subsequent calls to **SSL\_CONF\_cmd()** will be sent to **ctx**.

**SSL\_CONF\_CTX\_set\_ssl()** sets the context associated with **cctx** to the **SSL** structure **ssl**. Any previous **SSL** or **SSL\_CTX** associated with **cctx** is cleared. Subsequent calls to **SSL\_CONF\_cmd()** will be sent to **ssl**.

The function **SSL\_CONF\_CTX\_finish()** must be called after all configuration operations have been completed. It is used to finalise any operations or to process defaults.

## NOTES

The context need not be set or it can be set to **NULL** in which case only syntax checking of commands is performed, where possible.

## RETURN VALUES

**SSL\_CONF\_CTX\_set\_ssl\_ctx()** and **SSL\_CTX\_set\_ssl()** do not return a value.

**SSL\_CONF\_CTX\_finish()** returns 1 for success and 0 for failure.

## SEE ALSO

[**ssl**(7)](/ssl/7.md), **SSL\_CONF\_CTX\_new**(3), **SSL\_CONF\_CTX\_set\_flags**(3), **SSL\_CONF\_CTX\_set1\_prefix**(3), **SSL\_CONF\_cmd**(3), **SSL\_CONF\_cmd\_argv**(3)

## HISTORY

These functions were added in OpenSSL 1.0.2.

## COPYRIGHT

Copyright 2012-2023 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\>.
