diff --git a/hopenssl.cabal b/hopenssl.cabal
--- a/hopenssl.cabal
+++ b/hopenssl.cabal
@@ -1,56 +1,66 @@
-name:                   hopenssl
-version:                2.2.3
-copyright:              (c) 2004-2018 Peter Simons
-license:                BSD3
-license-file:           LICENSE
-author:                 Peter Simons, Markus Rothe
-maintainer:             Peter Simons <simons@cryp.to>
-homepage:               http://github.com/peti/hopenssl
-category:               Foreign, Cryptography
-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,
-                        RIPEMD160, and various SHA variants through the EVP
-                        digest interface.
-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.2
+name:          hopenssl
+version:       2.2.4
+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,
+               RIPEMD160, and various SHA variants through the EVP digest interface.
+license:       BSD3
+license-file:  LICENSE
+copyright:     (c) 2004-2018 Peter Simons
+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
+category:      Foreign, Cryptography
+homepage:      http://github.com/peti/hopenssl
+build-type:    Simple
+cabal-version: >= 1.8
 
 source-repository head
-  type:                 git
-  location:             git://github.com/peti/hopenssl.git
+  type:     git
+  location: git://github.com/peti/hopenssl.git
 
+flag link-libz
+  default:     False
+  manual:      True
+  description: OpenSSL\'s @libcrypto@ has a dependency on @libz@
+
 library
-  build-depends:        base >= 4.6 && < 5, bytestring
-  hs-source-dirs:       src
-  other-extensions:     CPP, DeriveDataTypeable, EmptyDataDecls, FlexibleInstances,
-                        ForeignFunctionInterface, TypeSynonymInstances
-  extra-libraries:      crypto
-  includes:             "openssl/evp.h"
-  exposed-modules:      OpenSSL.Digest
-                        OpenSSL.Util
-                        OpenSSL.EVP.Digest
-                        OpenSSL.EVP.Digest.Algorithm
-                        OpenSSL.EVP.Digest.Digest
-                        OpenSSL.EVP.Digest.Context
-                        OpenSSL.EVP.Digest.Error
-                        OpenSSL.EVP.Digest.Initialization
-  build-tools:          hsc2hs
+  exposed-modules:  OpenSSL.Digest
+                    OpenSSL.EVP.Digest
+                    OpenSSL.EVP.Digest.Algorithm
+                    OpenSSL.EVP.Digest.Context
+                    OpenSSL.EVP.Digest.Digest
+                    OpenSSL.EVP.Digest.Error
+                    OpenSSL.EVP.Digest.Initialization
+                    OpenSSL.Util
+  hs-source-dirs:   src
+  build-depends:    base >= 4.6 && < 5, bytestring
+  other-extensions: FlexibleInstances
+                    EmptyDataDecls
+                    CPP
+                    TypeSynonymInstances
+                    ForeignFunctionInterface
+                    DeriveDataTypeable
+  extra-libraries:  crypto
+  includes:         openssl/evp.h
+  build-tools:      hsc2hs
 
+  if flag(link-libz)
+    extra-libraries: z
+
 test-suite check-low-level-digest-api
-  type:                 exitcode-stdio-1.0
-  main-is:              CheckLowLevelDigestAPI.hs
-  other-modules:        OpenSesame
-  hs-source-dirs:       test
-  build-depends:        base >= 3 && < 5, hopenssl, HUnit
-  ghc-options:          -threaded
+  type:           exitcode-stdio-1.0
+  main-is:        CheckLowLevelDigestAPI.hs
+  other-modules:  OpenSesame
+  hs-source-dirs: test
+  build-depends:  base >= 3 && < 5, HUnit, hopenssl
+  ghc-options:    -threaded
 
 test-suite check-high-level-digest-api
-  type:                 exitcode-stdio-1.0
-  main-is:              CheckHighLevelDigestAPI.hs
-  other-modules:        OpenSesame
-  hs-source-dirs:       test
-  build-depends:        base >= 3 && < 5, hopenssl, HUnit, bytestring
-  ghc-options:          -threaded
+  type:           exitcode-stdio-1.0
+  main-is:        CheckHighLevelDigestAPI.hs
+  other-modules:  OpenSesame
+  hs-source-dirs: test
+  build-depends:  base >= 3 && < 5, HUnit, bytestring, hopenssl
+  ghc-options:    -threaded
diff --git a/src/OpenSSL/EVP/Digest/Digest.hs b/src/OpenSSL/EVP/Digest/Digest.hs
--- a/src/OpenSSL/EVP/Digest/Digest.hs
+++ b/src/OpenSSL/EVP/Digest/Digest.hs
@@ -52,7 +52,7 @@
 
 -- | We don't support choosing a custom engine to implement the given
 -- algorithm. This type is just a place holder, and we always pass 'nullPtr'
--- whereever it is required to let OpenSSL choose whatever engine it thinks is
+-- wherever it is required to let OpenSSL choose whatever engine it thinks is
 -- best.
 
 data OpaqueEngine
