This might be of interest as an alternative to OpenSSL. I didn't read it in enough detail to know for sure. http://www.mozilla.org/projects/security/pki/nss/faq.html