SSL_CTX_SET_DOMAIN_FLAGS(3SSL)

πŸ’– SSL_CTX_SET_DOMAIN_FLAGS πŸ’–

okay bestie, so this is the OpenSSL manual page for SSL_CTX_SET_DOMAIN_FLAGS β€” it lives in section 3SSL, and it's all about controlling the concurrency model used by a QUIC domain. yes that's a lot of words, we'll get there πŸ’…


✨ 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 β€” these 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 πŸ‘‘

so like, 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 are literally the ones that decide the concurrency model used for a QUIC domain. if you want the full lore on all this concurrency stuff, it's in openssl-quic-concurrency(7) ✨

applications may use either one the flags here:

  • SSL_DOMAIN_FLAG_SINGLE_THREAD β€” picking this one configures the Single-Threaded Concurrency Model (SCM) 🧚
  • SSL_DOMAIN_FLAG_MULTI_THREAD β€” picking this one configures the Contentive Concurrency Model (CCM) (unless SSL_DOMAIN_FLAG_THREAD_ASSISTED is also specified).

and heads up πŸ’€ β€” if OpenSSL was built without thread support, this is identical to SSL_DOMAIN_FLAG_SINGLE_THREAD.

  • SSL_DOMAIN_FLAG_THREAD_ASSISTED β€” picking this one configures the Thread-Assisted Concurrency Model (TACM). it implies SSL_DOMAIN_FLAG_MULTI_THREAD and SSL_DOMAIN_FLAG_BLOCKING.
no cap: this concurrency model is not available if OpenSSL was built without thread support β€” and in that case, trying to configure it will result in an error 😭
  • SSL_DOMAIN_FLAG_BLOCKING β€” enables 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). πŸ™ˆ

and 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. periodt.


changing these flags using SSL_CTX_set_domain_flags() has no effect on QUIC domains which have already been created. like, it's giving "too late bestie" πŸ’…

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() all return 1 on success and 0 on failure. slay.

  • 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) β€” go read these too, iykyk πŸ’œ


⭐ HISTORY ⭐

these functions were added in OpenSSL 3.5. new-ish, cute, iconic.


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>.


and that's the whole page, bestie!! πŸ’–βœ¨πŸŒΈ this was OpenSSL 4.0.3, dated 2026-09-29 β€” mwah, go forth and configure your concurrency models responsibly πŸ§šπŸ’…πŸ‘‘

πŸ“¦ where this page comes from