bcgit / bc-java

Bouncy Castle Java Distribution (Mirror)
https://www.bouncycastle.org/java.html
MIT License
2.33k stars 1.14k forks source link

null pointer when doing v6 aead symmetric encryption #1913

Open singpolyma opened 5 days ago

singpolyma commented 5 days ago

https://github.com/bcgit/bc-java/blob/main/pg/src/main/java/org/bouncycastle/openpgp/operator/bc/BcPBEKeyEncryptionMethodGenerator.java#L119 expects sessionInfo to be non-null, but https://github.com/bcgit/bc-java/blob/main/pg/src/main/java/org/bouncycastle/openpgp/PGPEncryptedDataGenerator.java#L229 sets it to null when there is only a single symmetric encryption key.