Changes to support multiple tls connection

Jira issue: WP-860