---
name: "nng_tls_config"
section: "5"
platform: "linux"
package: "libnng-dev"
version: "1.10.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nng_tls_config"
---

# nng\_tls\_config(5)

TLS configuration object

## NAME

nng\_tls\_config - TLS configuration object

## SYNOPSIS

```
#include <nng/supplemental/tls/tls.h>
typedef struct nng_tls_config nng_tls_config;
```

## DESCRIPTION

An `nng_tls_config` represents a single TLS configuration object, which can be used to configure TLS servers and clients.

Configuration data includes details such as certificate chains used for validation of remote peers, local key and certificate material, server names, and so forth. Additionally, a configuration can be used either in client mode, or in server mode.

Configuration objects may be shared, and are reference counted. However once a configuration is used, it enters a read-only state that precludes further modifications to the configuration.

Messages are allocated using the `nng_tls_config_alloc()` function, and are deallocated using the `nng_tls_config_free()` function.

## SEE ALSO

[nng\_tls\_config\_alloc(3tls)](/nng_tls_config_alloc/3tls.md), [nng\_tls\_config\_auth\_mode(3tls)](/nng_tls_config_auth_mode/3tls.md), [nng\_tls\_config\_ca\_chain(3tls)](/nng_tls_config_ca_chain/3tls.md), [nng\_tls\_config\_own\_cert(3tls)](/nng_tls_config_own_cert/3tls.md), [nng\_tls\_config\_free(3tls)](/nng_tls_config_free/3tls.md), [nng\_tls\_config\_hold(3tls)](/nng_tls_config_hold/3tls.md), [nng\_tls\_config\_server\_name(3tls)](/nng_tls_config_server_name/3tls.md), [nng(7)](/nng/7.md)
