http://funcptr.net/2012/04/08/openssl-as-a-filter-(or-non-blocking-openssl)/

New blog post out (as of two days ago, just got around to uploading it). This is a trick I found online on how to use OpenSSL as a filter. This allows one to easily hook OpenSSL into an event library, such as for example libev.

The code sample is written in C++, but it should be fairly simple to translate it into C if so desired. If you have any questions feel free to post here!
Shared publicly