Permalink
Browse files

Preparing this to be a seperate package

  • Loading branch information...
1 parent 513e782 commit 31cca5bba7479cd0df1c8c375c80e52522d8374d @singpolyma committed Apr 25, 2012
Showing with 93 additions and 315 deletions.
  1. +15 −15 Makefile
  2. +4 −13 README
  3. +74 −0 openpgp-Crypto.cabal
  4. +0 −162 openpgp.cabal
  5. +0 −1 tests/data/000002-013.user_id
  6. BIN tests/data/000003-002.sig
  7. BIN tests/data/000004-012.ring_trust
  8. BIN tests/data/000005-002.sig
  9. BIN tests/data/000006-012.ring_trust
  10. BIN tests/data/000007-002.sig
  11. BIN tests/data/000008-012.ring_trust
  12. BIN tests/data/000009-002.sig
  13. BIN tests/data/000010-012.ring_trust
  14. BIN tests/data/000011-002.sig
  15. BIN tests/data/000012-012.ring_trust
  16. BIN tests/data/000013-014.public_subkey
  17. BIN tests/data/000014-002.sig
  18. BIN tests/data/000015-012.ring_trust
  19. BIN tests/data/000017-002.sig
  20. BIN tests/data/000018-012.ring_trust
  21. +0 −1 tests/data/000019-013.user_id
  22. BIN tests/data/000020-002.sig
  23. BIN tests/data/000021-012.ring_trust
  24. BIN tests/data/000022-002.sig
  25. BIN tests/data/000023-012.ring_trust
  26. BIN tests/data/000024-014.public_subkey
  27. BIN tests/data/000025-002.sig
  28. BIN tests/data/000026-012.ring_trust
  29. BIN tests/data/000028-002.sig
  30. BIN tests/data/000029-012.ring_trust
  31. +0 −1 tests/data/000030-013.user_id
  32. BIN tests/data/000031-002.sig
  33. BIN tests/data/000032-012.ring_trust
  34. BIN tests/data/000033-002.sig
  35. BIN tests/data/000034-012.ring_trust
  36. +0 −1 tests/data/000036-013.user_id
  37. BIN tests/data/000037-002.sig
  38. BIN tests/data/000038-012.ring_trust
  39. BIN tests/data/000039-002.sig
  40. BIN tests/data/000040-012.ring_trust
  41. BIN tests/data/000041-017.attribute
  42. BIN tests/data/000042-002.sig
  43. BIN tests/data/000043-012.ring_trust
  44. BIN tests/data/000044-014.public_subkey
  45. BIN tests/data/000045-002.sig
  46. BIN tests/data/000046-012.ring_trust
  47. BIN tests/data/000047-005.secret_key
  48. +0 −1 tests/data/000048-013.user_id
  49. BIN tests/data/000049-002.sig
  50. BIN tests/data/000050-012.ring_trust
  51. BIN tests/data/000051-007.secret_subkey
  52. BIN tests/data/000052-002.sig
  53. BIN tests/data/000053-012.ring_trust
  54. BIN tests/data/000054-005.secret_key
  55. BIN tests/data/000055-002.sig
  56. BIN tests/data/000056-012.ring_trust
  57. +0 −1 tests/data/000057-013.user_id
  58. BIN tests/data/000058-002.sig
  59. BIN tests/data/000059-012.ring_trust
  60. BIN tests/data/000060-007.secret_subkey
  61. BIN tests/data/000061-002.sig
  62. BIN tests/data/000062-012.ring_trust
  63. BIN tests/data/000063-005.secret_key
  64. BIN tests/data/000064-002.sig
  65. BIN tests/data/000065-012.ring_trust
  66. +0 −1 tests/data/000066-013.user_id
  67. BIN tests/data/000067-002.sig
  68. BIN tests/data/000068-012.ring_trust
  69. BIN tests/data/000069-005.secret_key
  70. +0 −1 tests/data/000070-013.user_id
  71. BIN tests/data/000071-002.sig
  72. BIN tests/data/000072-012.ring_trust
  73. BIN tests/data/000073-017.attribute
  74. BIN tests/data/000074-002.sig
  75. BIN tests/data/000075-012.ring_trust
  76. BIN tests/data/000076-007.secret_subkey
  77. BIN tests/data/000077-002.sig
  78. BIN tests/data/000078-012.ring_trust
  79. +0 −1 tests/data/encryption-sym-aes256.gpg
  80. BIN tests/data/encryption-sym-cast5.gpg
  81. BIN tests/data/encryption.gpg
  82. +0 −7 tests/data/msg1.asc
  83. BIN tests/data/onepass_sig
  84. +0 −109 tests/suite.hs
View
@@ -4,56 +4,56 @@ VERSION=0.3
.PHONY: all clean doc install debian test
-all: sign verify keygen test report.html doc dist/build/libHSopenpgp-$(VERSION).a dist/openpgp-$(VERSION).tar.gz
+all: sign verify keygen test report.html doc dist/build/libHSopenpgp-Crypto-$(VERSION).a dist/openpgp-Crypto-$(VERSION).tar.gz
-install: dist/build/libHSopenpgp-$(VERSION).a
+install: dist/build/libHSopenpgp-Crypto-$(VERSION).a
cabal install
debian: debian/control
test: tests/suite
tests/suite
-sign: examples/sign.hs Data/*.hs Data/OpenPGP/*.hs
+sign: examples/sign.hs Data/OpenPGP/Crypto.hs
ghc --make $(GHCFLAGS) -o $@ $^
-verify: examples/verify.hs Data/*.hs Data/OpenPGP/*.hs
+verify: examples/verify.hs Data/OpenPGP/Crypto.hs
ghc --make $(GHCFLAGS) -o $@ $^
-keygen: examples/keygen.hs Data/*.hs Data/OpenPGP/*.hs
+keygen: examples/keygen.hs Data/OpenPGP/Crypto.hs
ghc --make $(GHCFLAGS) -o $@ $^
-tests/suite: tests/suite.hs Data/*.hs Data/OpenPGP/*.hs
+tests/suite: tests/suite.hs Data/OpenPGP/Crypto.hs
ghc --make $(GHCFLAGS) -o $@ $^
-report.html: examples/*.hs Data/*.hs Data/OpenPGP/*.hs tests/*.hs
+report.html: examples/*.hs Data/OpenPGP/Crypto.hs tests/suite.hs
-hlint $(HLINTFLAGS) --report Data examples
-doc: dist/doc/html/openpgp/index.html README
+doc: dist/doc/html/openpgp-Crypto/index.html README
-README: openpgp.cabal
+README: openpgp-Crypto.cabal
tail -n+$$(( `grep -n ^description: $^ | head -n1 | cut -d: -f1` + 1 )) $^ > .$@
head -n+$$(( `grep -n ^$$ .$@ | head -n1 | cut -d: -f1` - 1 )) .$@ > $@
-printf ',s/ //g\n,s/^.$$//g\nw\nq\n' | ed $@
$(RM) .$@
-dist/doc/html/openpgp/index.html: dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs
+dist/doc/html/openpgp-Crypto/index.html: dist/setup-config Data/OpenPGP/Crypto.hs
cabal haddock --hyperlink-source
-dist/setup-config: openpgp.cabal
+dist/setup-config: openpgp-Crypto.cabal
cabal configure
clean:
find -name '*.o' -o -name '*.hi' | xargs $(RM)
- $(RM) sign verify keygen tests/suite
+ $(RM) sign verify keygen tests/suite report.html
$(RM) -r dist dist-ghc
-debian/control: openpgp.cabal
+debian/control: openpgp-Crypto.cabal
cabal-debian --update-debianization
-dist/build/libHSopenpgp-$(VERSION).a: openpgp.cabal dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs
+dist/build/libHSopenpgp-Crypto-$(VERSION).a: openpgp-Crypto.cabal dist/setup-config Data/OpenPGP/Crypto.hs
cabal build --ghc-options="$(GHCFLAGS)"
-dist/openpgp-$(VERSION).tar.gz: openpgp.cabal dist/setup-config Data/OpenPGP.hs Data/OpenPGP/Crypto.hs README
+dist/openpgp-Crypto-$(VERSION).tar.gz: openpgp-Crypto.cabal dist/setup-config Data/OpenPGP/Crypto.hs README
cabal check
cabal sdist
View
17 README
@@ -1,18 +1,9 @@
-This is an OpenPGP library inspired by my work on OpenPGP libraries in
-Ruby <https://github.com/singpolyma/openpgp>,
-PHP <http://github.com/singpolyma/openpgp-php>,
-and Python <https://github.com/singpolyma/OpenPGP-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.
-
-There is also a wrapper around <http://hackage.haskell.org/package/Crypto>
+This is a wrapper around <http://hackage.haskell.org/package/Crypto>
that currently does fingerprint generation, signature generation, and
signature verification (for RSA keys only).
-It is intended that you use qualified imports with this library. If importing
-both modules, something like this will do:
+It is indended to be used with <http://hackage.haskell.org/openpgp>
+
+It is intended that you use qualified imports with this library.
-> import qualified Data.OpenPGP as OpenPGP
> import qualified Data.OpenPGP.Crypto as OpenPGP
View
@@ -0,0 +1,74 @@
+name: openpgp-Crypto
+version: 0.3
+cabal-version: >= 1.8
+license: OtherLicense
+license-file: COPYING
+category: Cryptography
+copyright: © 2011-2012 Stephen Paul Weber
+author: Stephen Paul Weber <singpolyma@singpolyma.net>
+maintainer: Stephen Paul Weber <singpolyma@singpolyma.net>
+stability: experimental
+tested-with: GHC == 7.0.3
+synopsis: Implementation of cryptography for use with OpenPGP using the Crypto library
+homepage: http://github.com/singpolyma/OpenPGP-Crypto
+bug-reports: http://github.com/singpolyma/OpenPGP-Haskell/issues
+build-type: Simple
+description:
+ This is a wrapper around <http://hackage.haskell.org/package/Crypto>
+ that currently does fingerprint generation, signature generation, and
+ signature verification (for RSA keys only).
+ .
+ It is indended to be used with <http://hackage.haskell.org/openpgp>
+ .
+ It is intended that you use qualified imports with this library.
+ .
+ > import qualified Data.OpenPGP.Crypto as OpenPGP
+
+extra-source-files:
+ README,
+ tests/suite.hs,
+ tests/data/000001-006.public_key,
+ tests/data/000016-006.public_key,
+ tests/data/000027-006.public_key,
+ tests/data/000035-006.public_key,
+ tests/data/uncompressed-ops-dsa.gpg
+ tests/data/uncompressed-ops-dsa-sha384.txt.gpg
+ tests/data/uncompressed-ops-rsa.gpg
+ tests/data/compressedsig.gpg
+ tests/data/compressedsig-zlib.gpg
+ tests/data/compressedsig-bzip2.gpg
+
+library
+ exposed-modules:
+ Data.OpenPGP.Crypto
+
+ build-depends:
+ base == 4.*,
+ containers,
+ bytestring,
+ utf8-string,
+ binary,
+ openpgp,
+ Crypto
+
+test-suite tests
+ type: exitcode-stdio-1.0
+ main-is: tests/suite.hs
+
+ build-depends:
+ base == 4.*,
+ containers,
+ bytestring,
+ utf8-string,
+ binary,
+ openpgp,
+ Crypto,
+ HUnit,
+ QuickCheck >= 2.4.1.1,
+ test-framework,
+ test-framework-hunit,
+ test-framework-quickcheck2
+
+source-repository head
+ type: git
+ location: git://github.com/singpolyma/OpenPGP-Crypto.git
View
@@ -1,162 +0,0 @@
-name: openpgp
-version: 0.3
-cabal-version: >= 1.8
-license: OtherLicense
-license-file: COPYING
-category: Data
-copyright: © 2011-2012 Stephen Paul Weber
-author: Stephen Paul Weber <singpolyma@singpolyma.net>
-maintainer: Stephen Paul Weber <singpolyma@singpolyma.net>
-stability: experimental
-tested-with: GHC == 7.0.3
-synopsis: Implementation of the OpenPGP message format
-homepage: http://github.com/singpolyma/OpenPGP-Haskell
-bug-reports: http://github.com/singpolyma/OpenPGP-Haskell/issues
-build-type: Simple
-description:
- This is an OpenPGP library inspired by my work on OpenPGP libraries in
- Ruby <https://github.com/singpolyma/openpgp>,
- PHP <http://github.com/singpolyma/openpgp-php>,
- and Python <https://github.com/singpolyma/OpenPGP-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.
- .
- There is also a wrapper around <http://hackage.haskell.org/package/Crypto>
- that currently does fingerprint generation, signature generation, and
- signature verification (for RSA keys only).
- .
- It is intended that you use qualified imports with this library. If importing
- both modules, something like this will do:
- .
- > import qualified Data.OpenPGP as OpenPGP
- > import qualified Data.OpenPGP.Crypto as OpenPGP
-
-extra-source-files:
- README,
- tests/suite.hs,
- tests/data/000001-006.public_key,
- tests/data/000002-013.user_id,
- tests/data/000003-002.sig,
- tests/data/000004-012.ring_trust,
- tests/data/000005-002.sig,
- tests/data/000006-012.ring_trust,
- tests/data/000007-002.sig,
- tests/data/000008-012.ring_trust,
- tests/data/000009-002.sig,
- tests/data/000010-012.ring_trust,
- tests/data/000011-002.sig,
- tests/data/000012-012.ring_trust,
- tests/data/000013-014.public_subkey,
- tests/data/000014-002.sig,
- tests/data/000015-012.ring_trust,
- tests/data/000016-006.public_key,
- tests/data/000017-002.sig,
- tests/data/000018-012.ring_trust,
- tests/data/000019-013.user_id,
- tests/data/000020-002.sig,
- tests/data/000021-012.ring_trust,
- tests/data/000022-002.sig,
- tests/data/000023-012.ring_trust,
- tests/data/000024-014.public_subkey,
- tests/data/000025-002.sig,
- tests/data/000026-012.ring_trust,
- tests/data/000027-006.public_key,
- tests/data/000028-002.sig,
- tests/data/000029-012.ring_trust,
- tests/data/000030-013.user_id,
- tests/data/000031-002.sig,
- tests/data/000032-012.ring_trust,
- tests/data/000033-002.sig,
- tests/data/000034-012.ring_trust,
- tests/data/000035-006.public_key,
- tests/data/000036-013.user_id,
- tests/data/000037-002.sig,
- tests/data/000038-012.ring_trust,
- tests/data/000039-002.sig,
- tests/data/000040-012.ring_trust,
- tests/data/000041-017.attribute,
- tests/data/000042-002.sig,
- tests/data/000043-012.ring_trust,
- tests/data/000044-014.public_subkey,
- tests/data/000045-002.sig,
- tests/data/000046-012.ring_trust,
- tests/data/000047-005.secret_key,
- tests/data/000048-013.user_id,
- tests/data/000049-002.sig,
- tests/data/000050-012.ring_trust,
- tests/data/000051-007.secret_subkey,
- tests/data/000052-002.sig,
- tests/data/000053-012.ring_trust,
- tests/data/000054-005.secret_key,
- tests/data/000055-002.sig,
- tests/data/000056-012.ring_trust,
- tests/data/000057-013.user_id,
- tests/data/000058-002.sig,
- tests/data/000059-012.ring_trust,
- tests/data/000060-007.secret_subkey,
- tests/data/000061-002.sig,
- tests/data/000062-012.ring_trust,
- tests/data/000063-005.secret_key,
- tests/data/000064-002.sig,
- tests/data/000065-012.ring_trust,
- tests/data/000066-013.user_id,
- tests/data/000067-002.sig,
- tests/data/000068-012.ring_trust,
- tests/data/000069-005.secret_key,
- tests/data/000070-013.user_id,
- tests/data/000071-002.sig,
- tests/data/000072-012.ring_trust,
- tests/data/000073-017.attribute,
- tests/data/000074-002.sig,
- tests/data/000075-012.ring_trust,
- tests/data/000076-007.secret_subkey,
- tests/data/000077-002.sig,
- tests/data/000078-012.ring_trust,
- tests/data/pubring.gpg,
- tests/data/secring.gpg,
- tests/data/compressedsig.gpg,
- tests/data/msg1.asc,
- tests/data/uncompressed-ops-rsa.gpg,
- tests/data/uncompressed-ops-dsa.gpg,
- tests/data/uncompressed-ops-dsa-sha384.txt.gpg,
- tests/data/encryption.gpg
-
-library
- exposed-modules:
- Data.OpenPGP
- Data.OpenPGP.Crypto
-
- build-depends:
- base == 4.*,
- containers,
- bytestring,
- utf8-string,
- binary,
- zlib,
- bzlib,
- Crypto
-
-test-suite tests
- type: exitcode-stdio-1.0
- main-is: tests/suite.hs
-
- build-depends:
- base == 4.*,
- containers,
- bytestring,
- utf8-string,
- binary,
- zlib,
- bzlib,
- Crypto,
- HUnit,
- QuickCheck >= 2.4.1.1,
- test-framework,
- test-framework-hunit,
- test-framework-quickcheck2
-
-source-repository head
- type: git
- location: git://github.com/singpolyma/OpenPGP-Haskell.git
@@ -1 +0,0 @@
-�$Test Key (RSA) <testkey@example.org>
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-�$Test Key (DSA) <testkey@example.com>
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-�+Test Key (DSA sign-only) <test@example.net>
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-�.Test Key (RSA sign-only) <testkey@example.net>
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-�$Test Key (RSA) <testkey@example.org>
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-�$Test Key (DSA) <testkey@example.com>
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-�+Test Key (DSA sign-only) <test@example.net>
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-�.Test Key (RSA sign-only) <testkey@example.net>
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
-� ��'6*�W`�V�LE���Q�jNp(Y3��N*�?���!�M��*�*ۈ;�hL�2�+��!x�̄�&&\J{q���<16.�-�D ޿���
Binary file not shown.
View
Binary file not shown.
View
@@ -1,7 +0,0 @@
------BEGIN PGP MESSAGE-----
-Version: OpenPrivacy 0.99
-
-yDgBO22WxBHv7O8X7O/jygAEzol56iUKiXmV+XmpCtmpqQUKiQrFqclFqUDBovzS
-vBSFjNSiVHsuAA==
-=njUN
------END PGP MESSAGE-----
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 31cca5b

Please sign in to comment.