SSL_CTX_SET_DOMAIN_FLAGS(3ossl)
π SSL_CTX_SET_DOMAIN_FLAGS(3ossl) β the ossl manual, but make it make sense
okay so bestie, this is a page from the OpenSSL manual (3ossl), and it's all about controlling the concurrency model used by a QUIC domain. I know, I know β sounds intimidating. It's not. Sit with me. π«Ά
β¨ 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 β all of these together control the concurrency model used by a QUIC domain. Like, the whole vibe of how your domain multitasks. π¦
πΈ 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. SSL_CTX_set_domain_flags() and SSL_CTX_get_domain_flags() set and get the QUIC domain flags on a SSL_CTX that's using a QUIC SSL_METHOD. These flags are literally the blueprint for which concurrency model gets used for a QUIC domain. If you want the full lore, the detailed introduction to these concepts lives in openssl-quic-concurrency(7). π
Applications may use either one the flags here β and here's the lineup, bestie:
SSL_DOMAIN_FLAG_SINGLE_THREADβ specifying this flag configures the Single-Threaded Concurrency Model (SCM). One thread. One main character. πSSL_DOMAIN_FLAG_MULTI_THREADβ specifying this flag configures the Contentive Concurrency Model (CCM) (unlessSSL_DOMAIN_FLAG_THREAD_ASSISTEDis also specified).
If OpenSSL was built without thread support, this is identical to SSL_DOMAIN_FLAG_SINGLE_THREAD. lowkey humbling ngl π
SSL_DOMAIN_FLAG_THREAD_ASSISTEDβ specifying this flag configures the Thread-Assisted Concurrency Model (TACM). It impliesSSL_DOMAIN_FLAG_MULTI_THREADandSSL_DOMAIN_FLAG_BLOCKING.
heads up π¨ this concurrency model is not available if OpenSSL was built without thread support, and in that case attempting to configure it will result in an error. no cap.
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_BLOCKINGis ignored. byeeee legacy πSSL_DOMAIN_FLAG_LEGACY_BLOCKINGβ enables legacy blocking compatibility mode. See "Legacy Blocking Support Compatibility" inopenssl-quic-concurrency(7)for the whole story.
Mutually exclusive flag combinations result in an error (for example, combining SSL_DOMAIN_FLAG_SINGLE_THREAD and SSL_DOMAIN_FLAG_MULTI_THREADED). Pick a lane, babe. π«
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. Zero is not a vibe here. π
Changing these flags using SSL_CTX_set_domain_flags() has no effect on QUIC domains which have already been created. Sorry to the "edit it after the fact" girlies β it's giving immutable. π
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 β like, check the fit before you commit. π§
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. iconic behaviour honestly β
π₯ 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. slay or flop, no in between. π
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()andSSL_CTX_get_domain_flags()fail if called on aSSL_CTXwhich is not using a QUICSSL_METHOD. wrong context, bestie. πSSL_get_domain_flags()fails if called on a non-QUICSSLobject.
π SEE ALSO π
SSL_new_domain(3), openssl-quic-concurrency(7)
π HISTORY π
These functions were added in OpenSSL 3.5. new drop alert π
π 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>.
and that's the whole page, bestie π this little number is from OpenSSL 3.5.6, dated 2026-04-07, and it's filed under SSL_CTX_SET_DOMAIN_FLAGS(3ossl) β go forth and configure your concurrency model responsibly π«Άβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms