TLS/SSL implementation in haskell