Change tls module to use sha256

Make it configurable, too. Resolves #15376.