You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.bouncycastle.openpgp.PGPEncryptedData$TruncatedStream.getLookAhead()" because "this.truncStream" is null
at org.bouncycastle.openpgp.PGPEncryptedData.verify(Unknown Source)
at org.bouncycastle.openpgp.examples.PBEFileProcessor.decryptFile(Unknown Source)
at org.bouncycastle.openpgp.examples.PBEFileProcessor.decryptFile(Unknown Source)
at org.bouncycastle.openpgp.examples.PBEFileProcessor.main(Unknown Source)
As a workaround, you can avoid calling PGPEncryptedData.verify() if you know you are working with a version 2 SEIPD packet (AEAD is verifying on the fly).
Using https://github.com/bcgit/bc-java/blob/main/pg/src/main/java/org/bouncycastle/openpgp/examples/PBEFileProcessor.java to decrypt an SEKv6+SEIPv2 message generated by bouncycastle, it works except that I get this exception after the file is successfully written:
As far as I can tell https://github.com/bcgit/bc-java/blob/main/pg/src/main/java/org/bouncycastle/openpgp/PGPEncryptedData.java#L227 should be true and so verify should return before getting to the
getLookAhead
call but it seems that is not happening for some reason.This is with version 1.77
The text was updated successfully, but these errors were encountered: