From e5e96fb157028944ca98e9fa4674b3d3378d80bc Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Fri, 29 Nov 2013 17:00:09 +0800 Subject: [PATCH] report a more useful error than undefined when trying to use HashSHA256 in SSL3 mode. --- core/Network/TLS/Crypto.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Network/TLS/Crypto.hs b/core/Network/TLS/Crypto.hs index 542bb8c..3ec1a0f 100644 --- a/core/Network/TLS/Crypto.hs +++ b/core/Network/TLS/Crypto.hs @@ -73,7 +73,7 @@ instance HashCtxC HashSHA256 where hashCName _ = "SHA256" hashCInit _ = HashSHA256 SHA256.init hashCUpdate (HashSHA256 ctx) b = HashSHA256 (SHA256.update ctx b) - hashCUpdateSSL _ _ = undefined + hashCUpdateSSL _ _ = error "CUpdateSSL with HashSHA256" hashCFinal (HashSHA256 ctx) = SHA256.finalize ctx -- functions to use the hidden class.