Cherry pick from upstream - "Use an external tls library"