Applying @FabriceMk fix to v50 branch
Merge pull request #1 from pabdavis/switch-ssl-tls

Applying @FabriceMk fix to v50 branch