BIO_S_NULL(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’œ 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 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