The most direct answer, if you do not want to replace the BIO functions of
the openssl socket implementation, is to take the now-configured socket
from the apr_socket_t structure, and pass this apr_os_socket_t to create
the openssl socket-based BIO context.  See apr_os_socket_get().

If you wanted to use the apr_socket_t and associated apr_ read/write
functions, is to create a custom set of BIO callbacks. You can look to the
httpd (mod_ssl) or subversion projects for various implementations.




On Mon, Jul 24, 2017 at 6:33 AM, dzfancy <dzfa...@163.com> wrote:
> Dear friends:
> I’m writing a linux/windows corss-platform software in c/c++ and using
> apache portable runtime (APR) in socket communication ,but i run into a
> problem which i do not know how to resolve.
> I plan to make my software to support ssl/tls safety communication and
> decide to use openssl library, after reading openssl api, i seems that  i
> can not using APR combined with openssl at the same time, because openssl
> used objects(SSL*  BIO*) in socket communication api such as  “SSL_read”
> “SSL_write”  “BIO_read” “BIO_read” are different from APR defined
> “apr_socket_t”
>
> I notice that APR utility library 1.6 has already supported openssl
> encryption/decryption,but I can not find any api related to tls . I still
> want to use  APR to implement ssl/tls communication,could someone give me
> any suggestion?
>
> Sincerely yours
>
> Dezhi Wang

Reply via email to