BIO_S_NULL(3)
π BIO_S_NULL(3) β like, the manual page bestie
okay so this is from the libcrypto library β you know, the crypto one β and it's the whole scoop on BIO_s_null, aka the null data sink. yes she's literally a black hole for bytes and I'm obsessed π
β¨ SYNOPSIS β¨
the whole vibe check, copy it exactly bestie:
#include <openssl/bio.h>
const BIO_METHOD *
BIO_s_null(void);
π¦ DESCRIPTION π¦
so BIO_s_null() hands you back the null sink BIO method. that's it, that's the function π
and what does a null sink do? nothing! that's her whole personality, and she ate. data written to the null sink is just... discarded ποΈβ¨ gone, deleted, not answering. and reads return EOF, periodt.
a null sink BIO behaves in a similar manner to the null(4) device β yep, same energy as /dev/null, iykyk π
here's the fun part though: a null BIO can be placed on the end of a chain to discard any data passed through it. lowkey iconic plumbing.
and a null sink is useful if, for example, an application wishes to digest some data by writing through a digest bio but not send the digested data anywhere π like β you wanna hash it but you don't wanna send it anywhere, right? since a BIO chain must normally include a source/sink BIO, this can be achieved by adding a null sink BIO to the end of the chain. slay, problem solved πΈ
π RETURN VALUES π
BIO_s_null() returns the null sink BIO method. simple, clean, no notes π
and okay here's the specific-lore bit bestie, don't skip it: when called on a null sink BIO object, BIO_method_type(3) returns the constant BIO_TYPE_NULL, and BIO_method_name(3) returns a pointer to the static string "NULL".
π¨ and this is the part where people get it twisted β that"NULL"is not to be confused with aNULstring, nor with aNULLpointer. three completely different creatures babe, do not mix them up π
π§ SEE ALSO π§
BIO_new(3)β go read it, she's the main character of chain-building π«Ά
π HISTORY π
BIO_s_null() first appeared in SSLeay 0.6.0 and has been available since OpenBSD 2.4. a true vintage icon, she's been serving since forever β
kay that's the page!! this one was rendered on the Debian build, dated July 16, 2025, filed under BIO_S_NULL(3) β mwah, go discard some bytes responsibly πβ¨π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2000 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms