I'm dealing with this large custom networking app. It was written in C++ (linux), using sockets.h --- the code involves passing around file(socket) descriptors, uses the structs, sets socket options, etc, etc.
Rather than rewriting it all, was wondering if there was anything available that uses the same function prototypes as socket.h, but uses openSSL to protect the comms channel.
Obviously, one still needs to set things such as the keys, verify locations, etc, but it would be great to avoid changing everything to BIOs or whatever...
Thanks!!
SSL_set_fd and SSL_get_fd let you set/retrieve file descriptor and avoid BIOs. You still need to use SSL_read/SSL_write instead of read/write, and so on.
To implement the sockets.h interface would require a way to easily go from the fd to the SSL object, which is non-trivial. No such wrapper comes with OpenSSL, and I highly doubt a third-party wrapper exists either.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With