I think, you are talking about TLS (Transport Layer Security). You could use OpenSSL from http://www.openssl.org. Maybe you could use the openssl binary alone (not a clean way, but it should work) like mentioned on http://sial.org/howto/openssl/examples/.
The cleanest way would be, however, to use the openssl dll api calls.
The cleanest way would be, however, to use the openssl dll api calls.