From ed0ea3133b14d84cede60d8706e925f03db9da53 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 21 Apr 2016 22:52:18 -0400 Subject: Build fixes for Debian Jessie. --- Compat.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Compat.hs') diff --git a/Compat.hs b/Compat.hs index 43f62c0..3b77851 100644 --- a/Compat.hs +++ b/Compat.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} module Compat where import Data.Bits @@ -7,6 +8,8 @@ import Data.ASN1.Encoding import Data.ASN1.BinaryEncoding import Crypto.PubKey.RSA as RSA +#if defined(VERSION_cryptonite) + instance ASN1Object PublicKey where toASN1 pubKey = \xs -> Start Sequence : IntVal (public_n pubKey) @@ -38,6 +41,7 @@ instance ASN1Object PublicKey where fromASN1 _ = Left "fromASN1: RSA.PublicKey: unexpected format" +#endif toPositive :: Integer -> Integer toPositive int -- cgit v1.2.3