SSL_CTX_SET_DOMAIN_FLAGS(3ossl)
π SSL_CTX_set_domain_flags β the OpenSSL 3ossl manual, but make it make sense
okay bestie, sit down, hydrate, and let's talk about QUIC domain concurrency flags β¨ this is the 3ossl page from the OpenSSL fam, and it's literally just "how do we want this QUIC domain to do threads" π§΅π¦
πΈ 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. that's the whole job, no cap π
β¨ 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 decide which concurrency model your QUIC domain runs with. if you want the full lore drop on these concepts, it's all in openssl-quic-concurrency(7) π
applications may use either one of the flags here:
SSL_DOMAIN_FLAG_SINGLE_THREADβ setting this one gets you the Single-Threaded Concurrency Model (SCM). one thread, one vibe, iconic honestly πSSL_DOMAIN_FLAG_MULTI_THREADβ setting this configures the Contentive Concurrency Model (CCM)... unlessSSL_DOMAIN_FLAG_THREAD_ASSISTEDis also specified π- heads up: if OpenSSL was built without thread support, this is identical to
SSL_DOMAIN_FLAG_SINGLE_THREAD. no threads, no problem, just a different model than you asked for π
- heads up: if OpenSSL was built without thread support, this is identical to
SSL_DOMAIN_FLAG_THREAD_ASSISTEDβ setting this configures the Thread-Assisted Concurrency Model (TACM). it impliesSSL_DOMAIN_FLAG_MULTI_THREADandSSL_DOMAIN_FLAG_BLOCKING(package deal, no substitutions π«Ά)- > this concurrency model is not available if OpenSSL was built without thread support, and if you try to configure it anyway you get an error. periodt.
SSL_DOMAIN_FLAG_BLOCKINGβ enables reliable support for blocking I/O calls, and allocates whatever OS resources are necessary to actually pull that off. if this flag is specified,SSL_DOMAIN_FLAG_LEGACY_BLOCKINGgets ignored π«SSL_DOMAIN_FLAG_LEGACY_BLOCKINGβ enables legacy blocking compatibility mode. see "Legacy Blocking Support Compatibility" inopenssl-quic-concurrency(7)π
mutually exclusive flag combos result in an error (for example, combining SSL_DOMAIN_FLAG_SINGLE_THREAD and SSL_DOMAIN_FLAG_MULTI_THREADED) π pick a lane bestie, you cannot do both
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 an option, literally π«β¨
changing these flags using SSL_CTX_set_domain_flags() has no effect on QUIC domains which have already been created. the domains already out here living their lives, you can't retroactively change their whole personality π
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 the details. an application can retrieve the default domain flags by calling SSL_CTX_get_domain_flags() immediately after constructing a SSL_CTX β like, right after, before anything else gets a chance to touch it π΅οΈβοΈ
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. iykyk π
π₯ 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. one is the slay, zero is the sad π
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. new era, new flags π
π 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 was SSL_CTX_SET_DOMAIN_FLAGS(3ossl) from OpenSSL, version 3.5.9, dated 2026-09-29 β go configure your concurrency model and be free, ily πβ¨
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms