BIO_FIND_TYPE(3SSL)
π BIO_FIND_TYPE π
okay bestie, welcome to the OpenSSL manual, section 3SSL π this one's all about BIO chain traversal and honestly? it's giving "walking down the chain and checking everyone's vibe" β¨
β¨ NAME β¨
BIO_find_type, BIO_next, BIO_method_type β BIO chain traversal, no cap π¦
πΈ SYNOPSIS πΈ
#include <openssl/bio.h>
BIO *BIO_find_type(BIO *b, int bio_type);
BIO *BIO_next(BIO *b);
int BIO_method_type(const BIO *b);
π DESCRIPTION π
so BIO_find_type() is out here searching for a BIO of a given type in a chain, starting at BIO b, slay π
- if type is a specific type (like
BIO_TYPE_MEM) then it goes looking for a BIO of exactly that type, periodt - if type is a general type (like
BIO_TYPE_SOURCE_SINK) then it hunts for the next matching BIO of that general type π
BIO_find_type() returns the next matching BIO, or NULL if none is found π and heads up β if type is BIO_TYPE_NONE it will not find a match, it's just gonna be like that.
the following general types are defined: BIO_TYPE_DESCRIPTOR, BIO_TYPE_FILTER, and BIO_TYPE_SOURCE_SINK β¨
for a list of the specific types, go peek at the <openssl/bio.h> header file, iykyk π§
BIO_next() returns the next BIO in a chain π« you can use it to traverse all the BIOs in a chain, or team it up with BIO_find_type() to find all the BIOs of a certain type. dynamic duo energy fr fr π«Ά
BIO_method_type() returns the type of a BIO, that's it, that's the whole job πββοΈ
π RETURN VALUES π
BIO_find_type()β returns a matching BIO, orNULLfor no match πBIO_next()β returns the next BIO in a chain πBIO_method_type()β returns the type of the BIObβ
π₯ EXAMPLES π₯
traverse a chain looking for digest BIOs:
BIO *btmp;
btmp = in_bio; /* in_bio is chain to search through */
do {
btmp = BIO_find_type(btmp, BIO_TYPE_MD);
if (btmp == NULL)
break; /* Not found */
/* btmp is a digest BIO, do something with it ...*/
...
btmp = BIO_next(btmp);
} while (btmp);
π COPYRIGHT π
Copyright 2000-2024 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, you ate this π this lil manual moment came to you courtesy of 4.0.3 and 2026-09-29 β mwah, go traverse some chains π¦β¨
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms