summaryrefslogtreecommitdiff
path: root/Compat.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2016-04-21 22:52:18 -0400
committerjoe <joe@jerkface.net>2016-04-21 22:52:18 -0400
commited0ea3133b14d84cede60d8706e925f03db9da53 (patch)
treeb5b4c12ec31334a22610dd6b2d61468bca5731da /Compat.hs
parentdbe039a17b3e3ffa6f90c974f758a0b830f9fdba (diff)
Build fixes for Debian Jessie.
Diffstat (limited to 'Compat.hs')
-rw-r--r--Compat.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Compat.hs b/Compat.hs
index 43f62c0..3b77851 100644
--- a/Compat.hs
+++ b/Compat.hs
@@ -1,3 +1,4 @@
1{-# LANGUAGE CPP #-}
1module Compat where 2module Compat where
2 3
3import Data.Bits 4import Data.Bits
@@ -7,6 +8,8 @@ import Data.ASN1.Encoding
7import Data.ASN1.BinaryEncoding 8import Data.ASN1.BinaryEncoding
8import Crypto.PubKey.RSA as RSA 9import Crypto.PubKey.RSA as RSA
9 10
11#if defined(VERSION_cryptonite)
12
10instance ASN1Object PublicKey where 13instance ASN1Object PublicKey where
11 toASN1 pubKey = \xs -> Start Sequence 14 toASN1 pubKey = \xs -> Start Sequence
12 : IntVal (public_n pubKey) 15 : IntVal (public_n pubKey)
@@ -38,6 +41,7 @@ instance ASN1Object PublicKey where
38 fromASN1 _ = 41 fromASN1 _ =
39 Left "fromASN1: RSA.PublicKey: unexpected format" 42 Left "fromASN1: RSA.PublicKey: unexpected format"
40 43
44#endif
41 45
42toPositive :: Integer -> Integer 46toPositive :: Integer -> Integer
43toPositive int 47toPositive int