Extract TLS setup to common connection feature architecture