Manual Pages for UNIX Darwin command on man BIO_find_type
MyWebUniversity

Manual Pages for UNIX Darwin command on man BIO_find_type

BIOfindtype(3) OpenSSL BIOfindtype(3)

NAME

BIOfindtype, BIOnext - BIO chain traversal

SYNOPSIS

#include

BIO * BIOfindtype(BIO *b,int biotype); BIO * BIOnext(BIO *b);

#define BIOmethodtype(b) ((b)->method->type)

#define BIOTYPENONE 0

#define BIOTYPEMEM (1|0x0400)

#define BIOTYPEFILE (2|0x0400)

#define BIOTYPEFD (4|0x0400|0x0100)

#define BIOTYPESOCKET (5|0x0400|0x0100)

#define BIOTYPENULL (6|0x0400)

#define BIOTYPESSL (7|0x0200)

#define BIOTYPEMD (8|0x0200)

#define BIOTYPEBUFFER (9|0x0200)

#define BIOTYPECIPHER (10|0x0200)

#define BIOTYPEBASE64 (11|0x0200)

#define BIOTYPECONNECT (12|0x0400|0x0100)

#define BIOTYPEACCEPT (13|0x0400|0x0100)

#define BIOTYPEPROXYCLIENT (14|0x0200)

#define BIOTYPEPROXYSERVER (15|0x0200)

#define BIOTYPENBIOTEST (16|0x0200)

#define BIOTYPENULLFILTER (17|0x0200)

#define BIOTYPEBER (18|0x0200)

#define BIOTYPEBIO (19|0x0400)

#define BIOTYPEDESCRIPTOR 0x0100

#define BIOTYPEFILTER 0x0200

#define BIOTYPESOURCESINK 0x0400

DESCRIPTION

The BIOfindtype() searches for a BIO of a given type in a chain, starting at BIO bb. If ttyyppee is a specific type (such as BIOTYPEMEM) then a search is made for a BIO of that type. If ttyyppee is a general type (such as BBIIOOTTYYPPEESSOOUURRCCEESSIINNKK) then the next matching BIO of the given general type is searched for. BIOfindtype() returns the next matching BIO or NULL if none is found. Note: not all the BBIIOOTTYYPPEE** types above have corresponding BIO implementations. BIOnext() returns the next BIO in a chain. It can be used to traverse all BIOs in a chain or used in conjunction with BIOfindtype() to find all BIOs of a certain type. BIOmethodtype() returns the type of a BIO.

RETURN VALUES

BIOfindtype() returns a matching BIO or NULL for no match. BIOnext() returns the next BIO in a chain. BIOmethodtype() returns the type of the BIO bb. NNOOTTEESS BIOnext() was added to OpenSSL 0.9.6 to provide a 'clean' way to traverse a BIO chain or find multiple matches using BIOfindtype(). Previous versions had to use:

next = bio->nextbio;

BUGS

BIOfindtype() in OpenSSL 0.9.5a and earlier could not be safely passed a NULL pointer for the bb argument. EEXXAAMMPPLLEE Traverse a chain looking for digest BIOs: BIO *btmp; btmp = inbio; /* inbio is chain to search through */ do { btmp = BIOfindtype(btmp, BIOTYPEMD); if(btmp == NULL) break; /* Not found */ /* btmp is a digest BIO, do something with it ...*/ ... btmp = BIOnext(btmp); } while(btmp);

SEE ALSO

TBA

0.9.7l 2000-09-14 BIOfindtype(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™