Skip to content

Commit

Permalink
Merge branch 'release-0.8.2'
Browse files Browse the repository at this point in the history
Conflicts:
	project.clj
  • Loading branch information
greglook committed Jun 6, 2015
2 parents 0dc7b3a + 7274141 commit 1ab44ad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
33 changes: 13 additions & 20 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
(defproject mvxcvi/clj-pgp "0.8.1"
(defproject mvxcvi/clj-pgp "0.8.2"
:description "Wrapper for the Bouncy Castle OpenPGP library"
:url "https://github.com/greglook/clj-pgp"
:license {:name "Public Domain"
:url "http://unlicense.org/"}

:deploy-branches ["master"]

:aliases {"docs" ["do" ["doc"] ["marg" "--multi" "--dir" "doc/marginalia"] ["hiera"]]
:aliases {"doc-lit" ["marg" "--multi" "--dir" "doc/marginalia"]
"fuzz" ["with-profile" "+tool" "run" "-m" "clj-pgp.tool.fuzz"]}

:plugins [[codox "0.8.10"]
[lein-cloverage "1.0.2"]
[lein-marginalia "0.8.0"]]
:plugins [[lein-cloverage "1.0.2"]]

:dependencies [[byte-streams "0.1.13"]
[org.bouncycastle/bcpg-jdk15on "1.51"]
[org.bouncycastle/bcprov-jdk15on "1.51"]]
:dependencies [[byte-streams "0.2.0"]
[org.bouncycastle/bcpg-jdk15on "1.52"]
[org.bouncycastle/bcprov-jdk15on "1.52"]]

:hiera {:path "doc/ns-hiera.png"
:cluster-depth 1
:ignore-ns #{user}}
:hiera {:cluster-depth 1}

:codox {:defaults {:doc/format :markdown}
:exclude #{user clj-pgp.tags clj-pgp.util}
:output-dir "doc/api"
:src-dir-uri "https://github.com/greglook/clj-pgp/blob/master/"
:src-linenum-anchor-prefix "L"}
:codox {:exclude #{clj-pgp.tags clj-pgp.util}
:src-dir-uri "https://github.com/greglook/clj-pgp/blob/master/"}

:profiles {:dev {:source-paths ["dev"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/test.check "0.6.1"]
[org.clojure/tools.namespace "0.2.7"]]}
[org.clojure/test.check "0.7.0"]
[org.clojure/tools.namespace "0.2.10"]]}

:tool {:source-paths ["tool"]
:dependencies [[mvxcvi/puget "0.7.1"]
[org.clojure/core.async "0.1.303.0-886421-alpha"]]
:dependencies [[mvxcvi/puget "0.8.1"]
[org.clojure/core.async "0.1.361.0-d8047c-alpha"]]
:jvm-opts []}})
3 changes: 2 additions & 1 deletion src/clj_pgp/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
PGPSignatureList
PGPUtil)
(org.bouncycastle.openpgp.operator.bc
BcKeyFingerprintCalculator
BcPBESecretKeyDecryptorBuilder
BcPGPDigestCalculatorProvider)))

Expand Down Expand Up @@ -261,7 +262,7 @@
(defn ^:no-doc read-objects
"Lazily decodes a sequence of PGP objects from an input stream."
[^InputStream input]
(let [factory (PGPObjectFactory. input)]
(let [factory (PGPObjectFactory. input (BcKeyFingerprintCalculator.))]
(->>
(repeatedly #(.nextObject factory))
(take-while some?))))
Expand Down
8 changes: 5 additions & 3 deletions src/clj_pgp/keyring.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
PGPPublicKeyRingCollection
PGPSecretKeyRing
PGPSecretKeyRingCollection
PGPUtil)))
PGPUtil)
(org.bouncycastle.openpgp.operator.bc
BcKeyFingerprintCalculator)))


(defprotocol KeyRing
Expand Down Expand Up @@ -99,12 +101,12 @@
[source]
(with-open [stream (PGPUtil/getDecoderStream
(bytes/to-input-stream source))]
(PGPPublicKeyRingCollection. stream)))
(PGPPublicKeyRingCollection. stream (BcKeyFingerprintCalculator.))))


(defn load-secret-keyring
"Loads a secret keyring collection from a data source."
[source]
(with-open [stream (PGPUtil/getDecoderStream
(bytes/to-input-stream source))]
(PGPSecretKeyRingCollection. stream)))
(PGPSecretKeyRingCollection. stream (BcKeyFingerprintCalculator.))))

0 comments on commit 1ab44ad

Please sign in to comment.