- int BIO_read(BIO *b, void *buf, int len);
BIO_read() attempts to read len bytes from BIO b and places the data in buf.
BIO_read() read encrypted data from the output BIO.
- int BIO_write(BIO *b, void *buf, int len);
BIO_write() attempts to write len bytes from buf to BIO b.
BIO_write() write encrypted data into the input BIO.
https://www.openssl.org/docs/man1.0.2/man3/BIO_write.html
- int SSL_read(SSL *ssl, void *buf, int num);
SSL_read() try to read num bytes from the specified ssl into the buffer buf.
SSL_read() read unencrypted data which is stored in the input BIO.