diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
--- a/Setup.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-module Main (main) where
-
-import Distribution.Simple
-
-main :: IO ()
-main = defaultMain
diff --git a/hopenssl.cabal b/hopenssl.cabal
--- a/hopenssl.cabal
+++ b/hopenssl.cabal
@@ -1,5 +1,5 @@
 name:          hopenssl
-version:       2.2.4
+version:       2.2.5
 synopsis:      FFI Bindings to OpenSSL's EVP Digest Interface
 description:   Foreign-function bindings to the <http://www.openssl.org/ OpenSSL library>.
                Currently provides access to the messages digests MD5, DSS, DSS1,
@@ -10,15 +10,16 @@
 author:        Peter Simons, Markus Rothe
 maintainer:    Peter Simons <simons@cryp.to>
 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.3
+               GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2,
+               GHC == 9.2.5, GHC == 9.4.4
 category:      Foreign, Cryptography
-homepage:      http://github.com/peti/hopenssl
+homepage:      https://github.com/peti/hopenssl
 build-type:    Simple
-cabal-version: >= 1.8
+cabal-version: >= 1.10
 
 source-repository head
   type:     git
-  location: git://github.com/peti/hopenssl.git
+  location: https://github.com/peti/hopenssl.git
 
 flag link-libz
   default:     False
@@ -34,6 +35,7 @@
                     OpenSSL.EVP.Digest.Error
                     OpenSSL.EVP.Digest.Initialization
                     OpenSSL.Util
+  default-language: Haskell2010
   hs-source-dirs:   src
   build-depends:    base >= 4.6 && < 5, bytestring
   other-extensions: FlexibleInstances
@@ -56,6 +58,7 @@
   hs-source-dirs: test
   build-depends:  base >= 3 && < 5, HUnit, hopenssl
   ghc-options:    -threaded
+  default-language: Haskell2010
 
 test-suite check-high-level-digest-api
   type:           exitcode-stdio-1.0
@@ -64,3 +67,4 @@
   hs-source-dirs: test
   build-depends:  base >= 3 && < 5, HUnit, bytestring, hopenssl
   ghc-options:    -threaded
+  default-language: Haskell2010
diff --git a/src/OpenSSL/Digest.hs b/src/OpenSSL/Digest.hs
--- a/src/OpenSSL/Digest.hs
+++ b/src/OpenSSL/Digest.hs
@@ -1,5 +1,4 @@
 {-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE TypeSynonymInstances #-}
 
 {- |
    Maintainer:  simons@cryp.to
diff --git a/src/OpenSSL/EVP/Digest/Algorithm.hsc b/src/OpenSSL/EVP/Digest/Algorithm.hsc
--- a/src/OpenSSL/EVP/Digest/Algorithm.hsc
+++ b/src/OpenSSL/EVP/Digest/Algorithm.hsc
@@ -93,8 +93,18 @@
 foreign import ccall unsafe "openssl/evp.h EVP_get_digestbyname"
   _digestByName :: CString -> Algorithm
 
-foreign import ccall unsafe "openssl/evp.h EVP_MD_size"
+foreign import ccall unsafe
+#if OPENSSL_VERSION_MAJOR < 3
+  "openssl/evp.h EVP_MD_size"
+#else
+  "openssl/evp.h EVP_MD_get_size"
+#endif
   _digestSize :: Algorithm -> CInt
 
-foreign import ccall unsafe "openssl/evp.h EVP_MD_block_size"
+foreign import ccall unsafe
+#if OPENSSL_VERSION_MAJOR < 3
+  "openssl/evp.h EVP_MD_block_size"
+#else
+  "openssl/evp.h EVP_MD_get_block_size"
+#endif
   _digestBlockSize :: Algorithm -> CInt
diff --git a/test/CheckHighLevelDigestAPI.hs b/test/CheckHighLevelDigestAPI.hs
--- a/test/CheckHighLevelDigestAPI.hs
+++ b/test/CheckHighLevelDigestAPI.hs
@@ -19,5 +19,5 @@
 mkTest :: String -> String -> String -> Test
 mkTest input algoName expect = TestCase $
   case digestByName' algoName of
-    Nothing -> return ()
+    Nothing -> assertFailure ("cannot find digest algorithm " ++ show algoName)
     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
@@ -23,7 +23,7 @@
 mkTest :: String -> String -> String -> Test
 mkTest input algoName expect = TestCase $
   case digestByName' algoName of
-    Nothing -> return ()
+    Nothing -> assertFailure ("cannot find digest algorithm " ++ show algoName)
     Just algo -> digest algo input >>= assertEqual algoName expect
 
 digest :: Algorithm -> String -> IO String
diff --git a/test/OpenSesame.hs b/test/OpenSesame.hs
--- a/test/OpenSesame.hs
+++ b/test/OpenSesame.hs
@@ -2,12 +2,7 @@
 
 opensesame :: [(String, String)]
 opensesame = [ ("MD5",       "54ef36ec71201fdf9d1423fd26f97f6b")
-             , ("SHA",       "2ccefef64c76ac0d42ca1657457977675890c42f")
              , ("SHA1",      "5bcaff7f22ff533ca099b3408ead876c0ebba9a7")
-             , ("DSS",       "5bcaff7f22ff533ca099b3408ead876c0ebba9a7")
-             , ("DSS1",      "5bcaff7f22ff533ca099b3408ead876c0ebba9a7")
-             , ("RIPEMD160", "bdb2bba6ec93bd566dc1181cadbc92176aa78382")
-             , ("MDC2",      "112db2200ce1e9db3c2d132aea4ef7d0")
              , ("SHA224",    "1ee0f9d93a873a67fe781852d716cb3e5904e015aafaa4d1ff1a81bc")
              , ("SHA256",    "41ef4bb0b23661e66301aac36066912dac037827b4ae63a7b1165a5aa93ed4eb")
              , ("SHA384",    "ae2a5d6649035c00efe2bc1b5c97f4d5ff97fa2df06f273afa0231c425e8aff30e4cc1db5e5756e8d2245a1514ad1a2d")
