diff --git a/hopenssl.cabal b/hopenssl.cabal
--- a/hopenssl.cabal
+++ b/hopenssl.cabal
@@ -1,5 +1,5 @@
 name:                   hopenssl
-version:                2.2.2
+version:                2.2.3
 copyright:              (c) 2004-2018 Peter Simons
 license:                BSD3
 license-file:           LICENSE
@@ -16,7 +16,7 @@
 cabal-version:          >= 1.8
 build-type:             Simple
 tested-with:            GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
-                      , GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.1
+                      , GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.2
 
 source-repository head
   type:                 git
@@ -52,5 +52,5 @@
   main-is:              CheckHighLevelDigestAPI.hs
   other-modules:        OpenSesame
   hs-source-dirs:       test
-  build-depends:        base >= 3 && < 5, hopenssl, HUnit
+  build-depends:        base >= 3 && < 5, hopenssl, HUnit, bytestring
   ghc-options:          -threaded
diff --git a/test/CheckHighLevelDigestAPI.hs b/test/CheckHighLevelDigestAPI.hs
--- a/test/CheckHighLevelDigestAPI.hs
+++ b/test/CheckHighLevelDigestAPI.hs
@@ -3,10 +3,15 @@
 import OpenSSL.Digest
 import OpenSesame
 
+import Data.ByteString.Char8 ( unpack )
+import System.Exit
 import Test.HUnit
 
 main :: IO ()
-main = runTestTT (TestList tests) >> return ()
+main = do cnt <- runTestTT (TestList tests)
+          if errors cnt == 0 && failures cnt == 0
+             then exitSuccess
+             else exitFailure
 
 tests :: [Test]
 tests = map (uncurry (mkTest "open sesame")) opensesame
@@ -15,4 +20,4 @@
 mkTest input algoName expect = TestCase $
   case digestByName' algoName of
     Nothing -> return ()
-    Just algo -> assertEqual algoName expect (show (toHex (digestString algo input)))
+    Just algo -> assertEqual algoName expect (unpack (toHex (digestString algo input)))
diff --git a/test/CheckLowLevelDigestAPI.hs b/test/CheckLowLevelDigestAPI.hs
--- a/test/CheckLowLevelDigestAPI.hs
+++ b/test/CheckLowLevelDigestAPI.hs
@@ -8,10 +8,14 @@
 import Control.Exception
 import Foreign
 import Foreign.C.String
+import System.Exit
 import Test.HUnit
 
 main :: IO ()
-main = runTestTT (TestList tests) >> return ()
+main = do cnt <- runTestTT (TestList tests)
+          if errors cnt == 0 && failures cnt == 0
+             then exitSuccess
+             else exitFailure
 
 tests :: [Test]
 tests = map (uncurry (mkTest "open sesame")) opensesame
