Change tls module to use sha256

Make it configurable, too. Resolves #15376.
Merge pull request #15391 from cachedout/tls_sha256

Change tls module to use sha256