BIO_S_NULL(3ossl)
π BIO_S_NULL β the null data sink, bestie (from the 3ossl manual)
β¨ NAME β¨
BIO_s_null β the literal null data sink, aka the /dev/null of the BIO world π³οΈπ
πΈ SYNOPSIS πΈ
#include <openssl/bio.h>
const BIO_METHOD *BIO_s_null(void);
π¦ DESCRIPTION π¦
okay so BIO_s_null() hands you back the null sink BIO method. that's it, that's the whole vibe π
what does a null sink actually do? literally nothing, and that's the point:
- data written to the null sink gets discarded β gone, poof, bye π«Ά
- reads return
EOFβ there is nothing for you here, bestie π
π NOTES π
a null sink BIO lowkey behaves in a similar manner to the Unix /dev/null device π³οΈ β same energy, no cap.
a null bio can be placed on the end of a chain to discard any data passed through it. iconic behavior honestly.
and here's where it gets useful β a null sink is handy if, for example, an application wishes to digest some data by writing through a digest bio but not send the digested data anywhere π. since a BIO chain must normally include a source/sink BIO, you can achieve this by adding a null sink BIO to the end of the chain π
fr fr, it's the "I want the side effects but not the output" queen of the BIO world πβ¨
π RETURN VALUES π
BIO_s_null() returns the null sink BIO method. that's it. that's the return value. periodt π
π COPYRIGHT π
Copyright 2000-2016 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>.
okay bye bestie, go discard some bytes responsibly π§π
this cutie was brought to you by OpenSSL 3.5.6, dated 2026-04-07 β mwah, catch you in the next manpage ππ
π¦ 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