nbdkit_is_tls(3)
β¨ nbdkit_is_tls β¨
okay bestie, gather round, because this is the little function that tells you whether your connection is wearing its β¨TLSβ¨ armor or just rolling in with vibes only. it lives in nbdkit, manual section 3, and it's genuinely so useful i'm obsessed π«Ά
πΈ NAME πΈ
nbdkit_is_tls β get the TLS status of the connection for nbdkit π
π SYNOPSIS π
#include <nbdkit-plugin.h>
int nbdkit_is_tls (void);
π¦ DESCRIPTION π¦
okay so nbdkit_is_tls returns true if and only if TLS negotiation has been completed on the current connection. that's it. that's the whole job. icon behavior, honestly π
an nbdkit(1) plugin can use nbdkit_is_tls to limit connections according to whether the client connection is protected by TLS β like, "bestie you may only talk to me if you're encrypted" energy π
and the way this function works? it uses thread-local magic, so no parameter is required. no cap. it just knows π§
also, for the record: nbdkit-tls-fallback-filter(1) and the nbdkit --tls=require option are other alternatives. so you've got options, queen π
π RETURN VALUE π
- the function returns
1(true) if TLS negotiation has been completed πΈ - or
0(false) if not π
but listen β if there's an error, it callsnbdkit_error(3)and returns-1. so like, check for that, fr fr π
π LANGUAGE BINDINGS π
everybody gets a turn, and that's on inclusivity β¨
π nbdkit-ocaml-plugin(3)
NBDKit.is_tls : unit -> bool
π nbdkit-python-plugin(3)
import nbdkit
tls = nbdkit.is_tls()
β nbdkit-rust-plugin(3)
use nbdkit::*;
pub fn is_tls() -> Result<bool>
π nbdkit-sh-plugin(3)
in nbdkit-sh-plugin(3) the TLS flag is available as parameter $4 of the "open" method. yes, $4. not $1. don't do that to yourself π
π HISTORY π
nbdkit_is_tls was added in nbdkit 1.22. a classic. an era. we love her π
πΈ SEE ALSO πΈ
nbdkit(1)nbdkit_export_name(3)nbdkit-plugin(3)nbdkit-filter(3)nbdkit-tls(1)nbdkit-tls-fallback-filter(1)
π«Ά AUTHORS π«Ά
Eric Blake β thank you for your service, legend π«‘
π COPYRIGHT π
Copyright Red Hat
π LICENSE π
bestie this part is the serious part, so i'm keeping every single word exactly as written β no edits, no vibes, just the legal text π
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
okay that's the whole page!! this one's from nbdkit-1.48.1, dated 2026-08-29 β go forth and check your TLS status, main character ππ bye bestie!!
π¦ where this page comes from
- fedora 44: nbdkit-devel 1.48.1-1.fc44 Β· BSD-3-Clause
- fedora 44: nbdkit-devel 1.48.1-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms