(open)ssl (secure socket layer)

has a good api !!

http://www.openssl.org/docs/ssl/