Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to access the member num of struct bio_st in openSSL-1.1.1

Tags:

openssl

in OpenSSL-1.1.1, struct bio_st is made opaque. To access the member of struct, APIs are provided. But I do not find an API to access the member int num of this struct.

in my application code with openSSL-1.0.2

fd_set fds;
FD_ZERO( &fds );
FD_SET( b->num, &fds );

for this now I get

error: dereferencing pointer to incomplete type 'BIO {aka struct bio_st}' FD_SET( b->num, &fds );

Does anyone have any idea?

like image 912
notun Avatar asked Oct 19 '25 06:10

notun


1 Answers

Use the macro BIO_get_fd to get this.

like image 59
Matt Caswell Avatar answered Oct 22 '25 05:10

Matt Caswell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!