diff options
author | joe <joe@jerkface.net> | 2016-04-21 22:52:18 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2016-04-21 22:52:18 -0400 |
commit | ed0ea3133b14d84cede60d8706e925f03db9da53 (patch) | |
tree | b5b4c12ec31334a22610dd6b2d61468bca5731da /Compat.hs | |
parent | dbe039a17b3e3ffa6f90c974f758a0b830f9fdba (diff) |
Build fixes for Debian Jessie.
Diffstat (limited to 'Compat.hs')
-rw-r--r-- | Compat.hs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,4 @@ | |||
1 | {-# LANGUAGE CPP #-} | ||
1 | module Compat where | 2 | module Compat where |
2 | 3 | ||
3 | import Data.Bits | 4 | import Data.Bits |
@@ -7,6 +8,8 @@ import Data.ASN1.Encoding | |||
7 | import Data.ASN1.BinaryEncoding | 8 | import Data.ASN1.BinaryEncoding |
8 | import Crypto.PubKey.RSA as RSA | 9 | import Crypto.PubKey.RSA as RSA |
9 | 10 | ||
11 | #if defined(VERSION_cryptonite) | ||
12 | |||
10 | instance ASN1Object PublicKey where | 13 | instance 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 | ||
42 | toPositive :: Integer -> Integer | 46 | toPositive :: Integer -> Integer |
43 | toPositive int | 47 | toPositive int |