SSL_SET_BLOCKING_MODE(3ossl)
β¨ SSL_SET_BLOCKING_MODE(3ossl) β¨
okay bestie, so this is a page from the OpenSSL manual, section 3ossl β and it's literally all about telling your QUIC connection whether it's allowed to vibe in blocking mode or not. π¦
π NAME
SSL_set_blocking_mode, SSL_get_blocking_mode β configure blocking mode for a QUIC SSL object β¨
πΈ SYNOPSIS
#include <openssl/ssl.h>
int SSL_set_blocking_mode(SSL *s, int blocking);
int SSL_get_blocking_mode(SSL *s);
π DESCRIPTION
So like, SSL_set_blocking_mode() is your girl for turning blocking mode on or off on a QUIC connection SSL object. No cap.
By default, blocking is enabled β unless the SSL object is configured to use an underlying read or write BIO that can't provide a poll descriptor (peep BIO_get_rpoll_descriptor(3) for that one), because bestie, blocking mode literally cannot be supported in that case. π
Want blocking mode ON? Call SSL_set_blocking_mode() with blocking set to 1. Want it OFF? Call it with blocking set to 0. That's it, that's the whole vibe check. β¨
Wanna know what mode you're currently in? Call SSL_get_blocking_mode(). π
- Blocking mode means calls like
SSL_read()andSSL_write()will block until the requested operation can actually be performed. They wait. Patiently. π§ - Nonblocking mode means those same calls will fail if the requested operation can't be performed immediately β see
SSL_get_error(3)for how to deal with that.
Important: these functions are only applicable to QUIC connection SSL objects. Other kinds of SSL object β like the ones for TLS β automatically function in blocking or nonblocking mode based on whether the underlying network read and write BIOs handed to the SSL object are themselves configured in nonblocking mode. So don't come at them with these functions, iykyk. π
Where a QUIC connection SSL object is used in nonblocking mode, the application is responsible for making sure the SSL object gets ticked regularly β see SSL_handle_events(3). Like, that's on you, bestie. Don't forget to tick. β°
And okay, here's a lil gotcha π β blocking mode gets disabled automatically if the application provides a QUIC connection SSL object with a network BIO that can't support blocking mode. If you wanna re-enable blocking mode in that case, the application must set a network BIO that can support blocking mode and then explicitly call SSL_set_blocking_mode(). No sneaky auto-re-enable, periodt. β¨
π RETURN VALUES
SSL_set_blocking_mode()returns1on success and0on failure. It fails if you call it on an SSL object that doesn't represent a QUIC connection, or if blocking mode just can't be used for the given connection. πSSL_get_blocking_mode()returns1if blocking is currently enabled. It returns-1if you call it on an unsupported SSL object. π
π SEE ALSO
SSL_handle_events(3), SSL_poll(3), openssl-quic(7), openssl-quic-concurrency(7), ssl(7)
β HISTORY
The SSL_set_blocking_mode() and SSL_get_blocking_mode() functions were added in OpenSSL 3.2. Iconic behaviour honestly. π
π«Ά COPYRIGHT
Copyright 2022-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 version 3.5.0, dated 2026-09-25, and it lives at SSL_SET_BLOCKING_MODE(3ossl) in the OpenSSL docs β go forth and block (or don't) responsibly πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms