TLS configuration based on libp2p TLS specs.
See https://github.com/libp2p/specs/blob/master/tls/tls.md.