---
name: "SSL_CTX_set_domain_flags"
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_CTX_set_domain_flags"
---

# SSL\_CTX\_set\_domain\_flags(3ssl)

control the concurrency model used by a QUIC domain

## NAME

SSL\_CTX\_set\_domain\_flags, SSL\_CTX\_get\_domain\_flags, SSL\_get\_domain\_flags, SSL\_DOMAIN\_FLAG\_SINGLE\_THREAD, SSL\_DOMAIN\_FLAG\_MULTI\_THREAD, SSL\_DOMAIN\_FLAG\_THREAD\_ASSISTED, SSL\_DOMAIN\_FLAG\_BLOCKING, SSL\_DOMAIN\_FLAG\_LEGACY\_BLOCKING - control the concurrency model used by a QUIC domain

## SYNOPSIS

```
 #include <openssl/ssl.h>
 #define SSL_DOMAIN_FLAG_SINGLE_THREAD
 #define SSL_DOMAIN_FLAG_MULTI_THREAD
 #define SSL_DOMAIN_FLAG_LEGACY_BLOCKING
 #define SSL_DOMAIN_FLAG_BLOCKING
 #define SSL_DOMAIN_FLAG_THREAD_ASSISTED
 int SSL_CTX_set_domain_flags(SSL_CTX *ctx, uint64_t flags);
 int SSL_CTX_get_domain_flags(SSL_CTX *ctx, uint64_t *flags);
 int SSL_get_domain_flags(SSL *ssl, uint64_t *flags);
```

## DESCRIPTION

**SSL\_CTX\_set\_domain\_flags()** and **SSL\_CTX\_get\_domain\_flags()** set and get the QUIC domain flags on a **SSL\_CTX** using a QUIC **SSL\_METHOD**. These flags determine the concurrency model which is used for a QUIC domain. A detailed introduction to these concepts can be found in **openssl-quic-concurrency**(7).

Applications may use either one the flags here:

- **SSL\_DOMAIN\_FLAG\_SINGLE\_THREAD**

  Specifying this flag configures the Single-Threaded Concurrency Model (SCM).

- **SSL\_DOMAIN\_FLAG\_MULTI\_THREAD**

  Specifying this flag configures the Contentive Concurrency Model (CCM) (unless **SSL\_DOMAIN\_FLAG\_THREAD\_ASSISTED** is also specified).

  If OpenSSL was built without thread support, this is identical to **SSL\_DOMAIN\_FLAG\_SINGLE\_THREAD**.

- **SSL\_DOMAIN\_FLAG\_THREAD\_ASSISTED**

  Specifying this flag configures the Thread-Assisted Concurrency Model (TACM). It implies **SSL\_DOMAIN\_FLAG\_MULTI\_THREAD** and **SSL\_DOMAIN\_FLAG\_BLOCKING**.

  This concurrency model is not available if OpenSSL was built without thread support, in which case attempting to configure it will result in an error.

- **SSL\_DOMAIN\_FLAG\_BLOCKING**

  Enable reliable support for blocking I/O calls, allocating whatever OS resources are necessary to realise this. If this flag is specified, **SSL\_DOMAIN\_FLAG\_LEGACY\_BLOCKING** is ignored.

- **SSL\_DOMAIN\_FLAG\_LEGACY\_BLOCKING**

  Enables legacy blocking compatibility mode. See "Legacy Blocking Support Compatibility" in **openssl-quic-concurrency**(7).

Mutually exclusive flag combinations result in an error (for example, combining **SSL\_DOMAIN\_FLAG\_SINGLE\_THREAD** and **SSL\_DOMAIN\_FLAG\_MULTI\_THREADED**).

Because exactly one concurrency model must be chosen, the domain flags cannot be set to 0 and attempting to do so will result in an error.

Changing these flags using **SSL\_CTX\_set\_domain\_flags()** has no effect on QUIC domains which have already been created.

The default set of domain flags set on a newly created **SSL\_CTX** may vary by OpenSSL version, chosen **SSL\_METHOD**, and operating environment. See **openssl-quic-concurrency**(7) for details. An application can retrieve the default domain flags by calling **SSL\_CTX\_get\_domain\_flags()** immediately after constructing a **SSL\_CTX**.

**SSL\_get\_domain\_flags()** retrieves the domain flags which are effective for a QUIC domain when called on any QUIC SSL object under that domain.

## RETURN VALUES

**SSL\_CTX\_set\_domain\_flags()**, **SSL\_CTX\_get\_domain\_flags()** and **SSL\_get\_domain\_flags()** return 1 on success and 0 on failure.

**SSL\_CTX\_set\_domain\_flags()** fails if called with a set of flags which are inconsistent or which cannot be supported given the current environment.

**SSL\_CTX\_set\_domain\_flags()** and **SSL\_CTX\_get\_domain\_flags()** fail if called on a **SSL\_CTX** which is not using a QUIC **SSL\_METHOD**.

**SSL\_get\_domain\_flags()** fails if called on a non-QUIC SSL object.

## SEE ALSO

**SSL\_new\_domain**(3), **openssl-quic-concurrency**(7)

## HISTORY

These functions were added in OpenSSL 3.5.

## COPYRIGHT

Copyright 2024-2025 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\>.
