Adding support for TLS connections with X.509 cert

The tls object will throw a 'SELF_SIGNED_CERT_IN_CHAIN' error when using X.509
certificates with a particular host.