debian/0000755000000000000000000000000012151515254007167 5ustar debian/watch0000644000000000000000000000033212036251051010210 0ustar version=3 opts="downloadurlmangle=s|archive/([\w\d_-]+)/([\d\.]+)/|archive/$1/$2/$1-$2.tar.gz|,\ filenamemangle=s|(.*)/$|openpgp-$1.tar.gz|" \ http://hackage.haskell.org/packages/archive/openpgp \ ([\d\.]*\d)/ debian/rules0000755000000000000000000000020512036251051010236 0ustar #!/usr/bin/make -f DEB_ENABLE_TESTS = yes include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/hlibrary.mk debian/copyright0000644000000000000000000000136112036251050011114 0ustar Copyright © 2011, Stephen Paul Weber Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. debian/source/0000755000000000000000000000000012036251051010461 5ustar debian/source/format0000644000000000000000000000001312036251051011666 0ustar 3.0 (quilt)debian/patches/0000755000000000000000000000000012036251051010610 5ustar debian/patches/disable-missing-test.diff0000644000000000000000000000117512036251051015475 0ustar --- a/tests/suite.hs +++ b/tests/suite.hs @@ -130,7 +130,7 @@ testCase "000076-007.secret_subkey" (testSerialization "000076-007.secret_subkey"), testCase "000077-002.sig" (testSerialization "000077-002.sig"), testCase "000078-012.ring_trust" (testSerialization "000078-012.ring_trust"), - testCase "002182-002.sig" (testSerialization "002182-002.sig"), + -- testCase "002182-002.sig" (testSerialization "002182-002.sig"), testCase "pubring.gpg" (testSerialization "pubring.gpg"), testCase "secring.gpg" (testSerialization "secring.gpg"), testCase "compressedsig.gpg" (testSerialization "compressedsig.gpg"), debian/patches/0001-Better-bit-counting.-Handle-the-bitlength-of-0.patch0000644000000000000000000000327712036251051022607 0ustar From a595481760fe5c4dc2e970a3a164ac12d4005d73 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 11 Sep 2012 11:34:49 -0500 Subject: [PATCH 1/2] Better bit counting. Handle the bitlength of 0 Closes #17 --- Data/OpenPGP.hs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs index 70bd29a..a268dff 100644 --- a/Data/OpenPGP.hs +++ b/Data/OpenPGP.hs @@ -62,6 +62,7 @@ module Data.OpenPGP ( import Numeric import Control.Monad +import Control.Arrow import Control.Exception (assert) import Data.Bits import Data.Word @@ -790,19 +791,23 @@ signatures_and_data (Message lst) = newtype MPI = MPI Integer deriving (Show, Read, Eq, Ord) instance BINARY_CLASS MPI where put (MPI i) = do - put (((fromIntegral . B.length $ bytes) - 1) * 8 - + floor (logBase (2::Double) $ fromIntegral (bytes `B.index` 0)) - + 1 :: Word16) + put (bitl :: Word16) putSomeByteString bytes where - bytes = if B.null bytes' then B.singleton 0 else bytes' + (bytes, bitl) + | B.null bytes' = (B.singleton 0, 1) + | otherwise = + (bytes', (fromIntegral (B.length bytes') - 1) * 8 + sigBit) + + sigBit = fst $ until ((==0) . snd) + (first (+1) . second (`shiftR` 1)) (0,B.index bytes 0) bytes' = B.reverse $ B.unfoldr (\x -> if x == 0 then Nothing else Just (fromIntegral x, x `shiftR` 8) ) (assertProp (>=0) i) get = do length <- fmap fromIntegral (get :: Get Word16) - bytes <- getSomeByteString ((length + 7) `div` 8) + bytes <- getSomeByteString (assertProp (>0) $ (length + 7) `div` 8) return (MPI (B.foldl (\a b -> a `shiftL` 8 .|. fromIntegral b) 0 bytes)) -- 1.7.10.4 debian/patches/series0000644000000000000000000000012412036251051012022 0ustar disable-missing-test.diff 0001-Better-bit-counting.-Handle-the-bitlength-of-0.patch debian/compat0000644000000000000000000000000212147620570010370 0ustar 9 debian/control0000644000000000000000000001065312147621363010603 0ustar Source: haskell-openpgp Priority: extra Section: haskell Maintainer: Debian Haskell Group Uploaders: Clint Adams Build-Depends: debhelper (>= 9) , haskell-devscripts (>= 0.8.13) , cdbs , ghc , ghc-prof , libghc-bzlib-dev , libghc-bzlib-prof , libghc-utf8-string-dev , libghc-utf8-string-prof , libghc-zlib-dev , libghc-zlib-prof , libghc-hunit-dev , libghc-quickcheck2-dev (>> 2.4.1.1) , libghc-quickcheck-instances-dev , libghc-test-framework-dev , libghc-test-framework-hunit-dev , libghc-test-framework-quickcheck2-dev Build-Depends-Indep: ghc-doc , libghc-bzlib-doc , libghc-utf8-string-doc , libghc-zlib-doc Standards-Version: 3.9.4 Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/haskell-openpgp Vcs-Darcs: http://darcs.debian.org/pkg-haskell/haskell-openpgp Homepage: http://github.com/singpolyma/OpenPGP-Haskell Package: libghc-openpgp-dev Architecture: any Depends: ${shlibs:Depends} , ${haskell:Depends} , ${misc:Depends} Recommends: ${haskell:Recommends} Suggests: ${haskell:Suggests} Provides: ${haskell:Provides} Description: implementation of the OpenPGP message format This is an OpenPGP library inspired by Stephen Paul Weber's work on OpenPGP libraries in Ruby , PHP , and Python . . It defines types to represent OpenPGP messages as a series of packets and then defines instances of Data.Binary for each to facilitate encoding/decoding. . For performing cryptography, see or . It is intended that you use qualified imports with this library. . > import qualified Data.OpenPGP as OpenPGP . Author: Stephen Paul Weber Upstream-Maintainer: Stephen Paul Weber . This package contains the normal library files. Package: libghc-openpgp-prof Architecture: any Depends: ${haskell:Depends} , ${misc:Depends} Recommends: ${haskell:Recommends} Suggests: ${haskell:Suggests} Provides: ${haskell:Provides} Description: implementation of the OpenPGP message format; profiling libraries This is an OpenPGP library inspired by Stephen Paul Weber's work on OpenPGP libraries in Ruby , PHP , and Python . . It defines types to represent OpenPGP messages as a series of packets and then defines instances of Data.Binary for each to facilitate encoding/decoding. . For performing cryptography, see or . It is intended that you use qualified imports with this library. . > import qualified Data.OpenPGP as OpenPGP . Author: Stephen Paul Weber Upstream-Maintainer: Stephen Paul Weber . This package contains the libraries compiled with profiling enabled. Package: libghc-openpgp-doc Architecture: all Section: doc Depends: ${haskell:Depends} , ${misc:Depends} Recommends: ${haskell:Recommends} Suggests: ${haskell:Suggests} Description: implementation of the OpenPGP message format; documentation This is an OpenPGP library inspired by Stpehen Paul Weber's work on OpenPGP libraries in Ruby , PHP , and Python . . It defines types to represent OpenPGP messages as a series of packets and then defines instances of Data.Binary for each to facilitate encoding/decoding. . For performing cryptography, see or . It is intended that you use qualified imports with this library. . > import qualified Data.OpenPGP as OpenPGP . Author: Stephen Paul Weber Upstream-Maintainer: Stephen Paul Weber . This package contains the documentation files. debian/changelog0000644000000000000000000000130212151515254011035 0ustar haskell-openpgp (0.4-3build1) saucy; urgency=low * Rebuild for new GHC ABIs. -- Colin Watson Thu, 30 May 2013 01:17:48 +0100 haskell-openpgp (0.4-3) unstable; urgency=low * Enable compat level 9 -- Joachim Breitner Fri, 24 May 2013 12:51:35 +0200 haskell-openpgp (0.4-2) experimental; urgency=low * Depend on haskell-devscripts 0.8.13 to ensure this packages is built against experimental * Bump standards version, no change -- Joachim Breitner Thu, 08 Nov 2012 22:28:20 +0100 haskell-openpgp (0.4-1) unstable; urgency=low * Initial release. -- Clint Adams Tue, 11 Sep 2012 21:37:21 -0400