1 | =pod
|
---|
2 |
|
---|
3 | =head1 NAME
|
---|
4 |
|
---|
5 | BIO_set_data, BIO_get_data, BIO_set_init, BIO_get_init, BIO_set_shutdown,
|
---|
6 | BIO_get_shutdown - functions for managing BIO state information
|
---|
7 |
|
---|
8 | =head1 SYNOPSIS
|
---|
9 |
|
---|
10 | #include <openssl/bio.h>
|
---|
11 |
|
---|
12 | void BIO_set_data(BIO *a, void *ptr);
|
---|
13 | void *BIO_get_data(BIO *a);
|
---|
14 | void BIO_set_init(BIO *a, int init);
|
---|
15 | int BIO_get_init(BIO *a);
|
---|
16 | void BIO_set_shutdown(BIO *a, int shut);
|
---|
17 | int BIO_get_shutdown(BIO *a);
|
---|
18 |
|
---|
19 | =head1 DESCRIPTION
|
---|
20 |
|
---|
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 B<ptr> with
|
---|
24 | the BIO. This data can subsequently be retrieved via a call to BIO_get_data().
|
---|
25 | This can be used by custom BIOs for storing implementation specific information.
|
---|
26 |
|
---|
27 | The BIO_set_init() function sets the value of the BIO's "init" flag to indicate
|
---|
28 | whether initialisation has been completed for this BIO or not. A nonzero value
|
---|
29 | indicates that initialisation is complete, whilst zero indicates that it is not.
|
---|
30 | Often initialisation will complete during initial construction of the BIO. For
|
---|
31 | some BIOs however, initialisation may not complete until after additional steps
|
---|
32 | have occurred (for example through calling custom ctrls). The BIO_get_init()
|
---|
33 | function returns the value of the "init" flag.
|
---|
34 |
|
---|
35 | The BIO_set_shutdown() and BIO_get_shutdown() functions set and get the state of
|
---|
36 | this BIO's shutdown (i.e. BIO_CLOSE) flag. If set then the underlying resource
|
---|
37 | is also closed when the BIO is freed.
|
---|
38 |
|
---|
39 | =head1 RETURN VALUES
|
---|
40 |
|
---|
41 | BIO_get_data() returns a pointer to the implementation specific custom data
|
---|
42 | associated with this BIO, or NULL if none has been set.
|
---|
43 |
|
---|
44 | BIO_get_init() returns the state of the BIO's init flag.
|
---|
45 |
|
---|
46 | BIO_get_shutdown() returns the stat of the BIO's shutdown (i.e. BIO_CLOSE) flag.
|
---|
47 |
|
---|
48 | =head1 SEE ALSO
|
---|
49 |
|
---|
50 | L<bio(7)>, L<BIO_meth_new(3)>
|
---|
51 |
|
---|
52 | =head1 HISTORY
|
---|
53 |
|
---|
54 | The functions described here were added in OpenSSL 1.1.0.
|
---|
55 |
|
---|
56 | =head1 COPYRIGHT
|
---|
57 |
|
---|
58 | Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
---|
59 |
|
---|
60 | Licensed under the Apache License 2.0 (the "License"). You may not use
|
---|
61 | this file except in compliance with the License. You can obtain a copy
|
---|
62 | in the file LICENSE in the source distribution or at
|
---|
63 | L<https://www.openssl.org/source/license.html>.
|
---|
64 |
|
---|
65 | =cut
|
---|