uio-bmi/crypt4gh

PGPRuntimeOperationException during encryption

dtitov opened this issue · 2 comments

Exception in thread "main" org.bouncycastle.openpgp.PGPRuntimeOperationException: Iterator failed to get next object: unknown object in stream: 0
at org.bouncycastle.openpgp.PGPObjectFactory$1.getObject(Unknown Source)
at org.bouncycastle.openpgp.PGPObjectFactory$1.hasNext(Unknown Source)
at org.c02e.jpgpj.Ring.load(Ring.java:267)
at org.c02e.jpgpj.Ring.load(Ring.java:242)
at org.c02e.jpgpj.Key.load(Key.java:435)
at org.c02e.jpgpj.Key.<init>(Key.java:79)
at no.uio.ifi.crypt4gh.stream.Crypt4GHOutputStream.<init>(Crypt4GHOutputStream.java:83)
at no.uio.ifi.crypt4gh.app.Crypt4GHUtils.encryptFile(Crypt4GHUtils.java:42)
at no.uio.ifi.crypt4gh.app.Main.main(Main.java:57)
Caused by: java.io.IOException: unknown object in stream: 0
at org.bouncycastle.openpgp.PGPObjectFactory.nextObject(Unknown Source)
... 9 more
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

Can't reproduce.

I'm closing this issue since Bouncy Castle is not being used anymore in the new version of Crypt4GH.