netty/netty-tcnative — pull request #7 by normanmaurer (2014-12-09 20:10:36+00:00)
Title: Add support for client mode when constructed via SSL.newSSL(...)

Motivation:

At the moment it is not possible to use SSL in client mode with the added newSSL(...) abstraction as it will lead to a null pointer
and so segfaults. This is because we not setup our SSL object via SSLSocket and so the underlying datastructured are not set up
like expected.

Modifications:

* Store tcn_ssl_ctxt_t as data on the SSL object and use it to executed the SSL_callback_SSL_verify functions. Also add extra gards against
null pointers.
* Correctly setup seed and verify during newSSL(...)

Result:

It's now possible to also use newSSL(...) and use it for client mode