BIO_push(3) OpenSSL BIO_push(3) NNAAMMEE BIO_push, BIO_pop - add and remove BIOs from a chain. SSYYNNOOPPSSIISS #include BIO * BIO_push(BIO *b,BIO *append); BIO * BIO_pop(BIO *b); DDEESSCCRRIIPPTTIIOONN The _B_I_O___p_u_s_h_(_) function appends the BIO aappppeenndd to bb, it returns bb. _B_I_O___p_o_p_(_) removes the BIO bb from a chain and returns the next BIO in the chain, or NULL if there is no next BIO. The removed BIO then becomes a single BIO with no association with the original chain, it can thus be freed or attached to a different chain. NNOOTTEESS The names of these functions are perhaps a little misleading. _B_I_O___p_u_s_h_(_) joins two BIO chains whereas _B_I_O___p_o_p_(_) deletes a single BIO from a chain, the deleted BIO does not need to be at the end of a chain. The process of calling _B_I_O___p_u_s_h_(_) and _B_I_O___p_o_p_(_) on a BIO may have addi- tional consequences (a control call is made to the affected BIOs) any effects will be noted in the descriptions of individual BIOs. EEXXAAMMPPLLEESS For these examples suppose mmdd11 and mmdd22 are digest BIOs, bb6644 is a base64 BIO and ff is a file BIO. If the call: BIO_push(b64, f); is made then the new chain will be bb6644--ff. After making the calls BIO_push(md2, b64); BIO_push(md1, md2); the new chain is mmdd11--mmdd22--bb6644--ff. Data written to mmdd11 will be digested by mmdd11 and mmdd22, bbaassee6644 encoded and written to ff. It should be noted that reading causes data to pass in the reverse direction, that is data is read from ff, base64 ddeeccooddeedd and digested by mmdd11 and mmdd22. If the call: BIO_pop(md2); The call will return bb6644 and the new chain will be mmdd11--bb6644--ff data can be written to mmdd11 as before. RREETTUURRNN VVAALLUUEESS _B_I_O___p_u_s_h_(_) returns the end of the chain, bb. _B_I_O___p_o_p_(_) returns the next BIO in the chain, or NULL if there is no next BIO. SSEEEE AALLSSOO TBA 1.0.2u 2019-12-20 BIO_push(3)