1BIO_GET_DATA(3)                     OpenSSL                    BIO_GET_DATA(3)
2
3
4

NAME

6       BIO_set_data, BIO_get_data, BIO_set_init, BIO_get_init,
7       BIO_set_shutdown, BIO_get_shutdown - functions for managing BIO state
8       information
9

SYNOPSIS

11        #include <openssl/bio.h>
12
13        void BIO_set_data(BIO *a, void *ptr);
14        void *BIO_get_data(BIO *a);
15        void BIO_set_init(BIO *a, int init);
16        int BIO_get_init(BIO *a);
17        void BIO_set_shutdown(BIO *a, int shut);
18        int BIO_get_shutdown(BIO *a);
19

DESCRIPTION

21       These functions are mainly useful when implementing a custom BIO.
22
23       The BIO_set_data() function associates the custom data pointed to by
24       ptr with the BIO. This data can subsequently be retrieved via a call to
25       BIO_get_data().  This can be used by custom BIOs for storing
26       implementation specific information.
27
28       The BIO_set_init() function sets the value of the BIO's "init" flag to
29       indicate whether initialisation has been completed for this BIO or not.
30       A nonzero value indicates that initialisation is complete, whilst zero
31       indicates that it is not.  Often initialisation will complete during
32       initial construction of the BIO. For some BIOs however, initialisation
33       may not complete until after additional steps have occurred (for
34       example through calling custom ctrls). The BIO_get_init() function
35       returns the value of the "init" flag.
36
37       The BIO_set_shutdown() and BIO_get_shutdown() functions set and get the
38       state of this BIO's shutdown (i.e. BIO_CLOSE) flag. If set then the
39       underlying resource is also closed when the BIO is freed.
40

RETURN VALUES

42       BIO_get_data() returns a pointer to the implementation specific custom
43       data associated with this BIO, or NULL if none has been set.
44
45       BIO_get_init() returns the state of the BIO's init flag.
46
47       BIO_get_shutdown() returns the stat of the BIO's shutdown (i.e.
48       BIO_CLOSE) flag.
49

SEE ALSO

51       bio, BIO_meth_new
52

HISTORY

54       The functions described here were added in OpenSSL 1.1.0.
55
57       Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
58
59       Licensed under the OpenSSL license (the "License").  You may not use
60       this file except in compliance with the License.  You can obtain a copy
61       in the file LICENSE in the source distribution or at
62       <https://www.openssl.org/source/license.html>.
63
64
65
661.1.1q                            2023-02-06                   BIO_GET_DATA(3)
Impressum