From c604eeb6046c27fefc6eefbf389f21c989a55929 Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 29 Nov 2017 16:56:13 -0500 Subject: Disabled curve 25519 backport for newer cryptonite library. --- dht-client.cabal | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'dht-client.cabal') diff --git a/dht-client.cabal b/dht-client.cabal index 023f837e..b71f75de 100644 --- a/dht-client.cabal +++ b/dht-client.cabal @@ -56,13 +56,17 @@ flag xmpp description: Include code for xmpp clients default: True +flag cryptonite-backport + description: Backport curve 25519 to older cryptonite library. + default: False + library default-language: Haskell2010 default-extensions: PatternGuards , OverloadedStrings , RecordWildCards , NondecreasingIndentation - hs-source-dirs: src, cryptonite-backport, ., Presence + hs-source-dirs: src, ., Presence exposed-modules: Network.SocketLike Data.Digest.CRC32C Data.Bits.ByteString @@ -152,7 +156,6 @@ library , contravariant , xml-types - , cryptonite , memory , time , random @@ -199,20 +202,8 @@ library other-modules: Paths_dht_client - Crypto.Cipher.Salsa - Crypto.Cipher.XSalsa - Crypto.ECC.Class - Crypto.ECC.Simple.Prim - Crypto.ECC.Simple.Types - Crypto.Error.Types - Crypto.Internal.ByteArray - Crypto.Internal.Compat - Crypto.Internal.DeepSeq - Crypto.Internal.Imports - Crypto.PubKey.Curve25519 - C-sources: cbits/cryptonite_xsalsa.c, cbits/cryptonite_salsa.c, - Presence/monitortty.c + C-sources: Presence/monitortty.c -- if flag(aeson) build-depends: aeson, aeson-pretty, unordered-containers, vector @@ -231,6 +222,24 @@ library ghc-options: -fwarn-missing-signatures -fdefer-typed-holes ghc-prof-options: + if flag(cryptonite-backport) + cpp-options: -DCRYPTONITE_BACKPORT + hs-source-dirs: cryptonite-backport + C-sources: cbits/cryptonite_xsalsa.c, cbits/cryptonite_salsa.c, + other-modules: Crypto.Cipher.Salsa + Crypto.Cipher.XSalsa + Crypto.ECC.Class + Crypto.ECC.Simple.Prim + Crypto.ECC.Simple.Types + Crypto.Error.Types + Crypto.Internal.ByteArray + Crypto.Internal.Compat + Crypto.Internal.DeepSeq + Crypto.Internal.Imports + Crypto.PubKey.Curve25519 + build-depends: cryptonite < 0.22 + else + build-depends: cryptonite >= 0.22 executable dht hs-source-dirs: examples -- cgit v1.2.3