diff --git a/postgresql-typed.cabal b/postgresql-typed.cabal
--- a/postgresql-typed.cabal
+++ b/postgresql-typed.cabal
@@ -1,5 +1,5 @@
 Name:          postgresql-typed
-Version:       0.6.2.2
+Version:       0.6.2.3
 Cabal-Version: >= 1.10
 License:       BSD3
 License-File:  COPYING
@@ -58,6 +58,10 @@
   Description: Enable TLS (SSL) support in PostgreSQL server connections.
   Default: True
 
+Flag crypton
+  Description: Use crypton rather than cryptonite.
+  Default: True
+
 Library
   default-language:    Haskell2010
   Build-Depends:
@@ -93,7 +97,11 @@
     Database.PostgreSQL.Typed.TypeCache
   GHC-Options: -Wall
   if flag(md5)
-    Build-Depends: cryptonite >= 0.5, memory >= 0.5
+    Build-Depends: memory >= 0.5
+    if flag(crypton)
+      Build-Depends: crypton
+    else
+      Build-Depends: cryptonite >= 0.5
   if flag(binary)
     Build-Depends: postgresql-binary >= 0.8, text >= 1, uuid >= 1.3, scientific >= 0.3
   else
@@ -110,7 +118,11 @@
     Exposed-Modules:
       Database.PostgreSQL.Typed.HDBC
   if flag(tls)
-    Build-Depends: data-default, tls, x509, x509-store, x509-validation
+    Build-Depends: data-default
+    if flag(crypton)
+      Build-Depends: tls >= 1.7, crypton-x509, crypton-x509-store, crypton-x509-validation
+    else
+      Build-Depends: tls < 1.7, x509, x509-store, x509-validation
 
 test-suite test
   default-language:    Haskell2010
