neuhalje / bouncy-gpg

Make using Bouncy Castle with OpenPGP fun again!
https://neuhalje.github.io/bouncy-gpg/
Other
207 stars 54 forks source link

No (suitable) public key for encryption to [a provided recipient email address] found #53

Open ajaysethi8789 opened 4 years ago

ajaysethi8789 commented 4 years ago

When I'm adding the pub and secret keys of sender in KeyringConfig and i can't add more than two keys as per the function (withKeyRingsFromFiles)

But seems like it is expecting three keys (sender's public, private key and receiver public key) to be added in KeyringConfig but function doesn't allow us to add more than two keys, getting the following error "org.bouncycastle.openpgp.PGPException: No (suitable) public key for encryption to receiver@gmail.com found".

Should it be asking for the receiver public key in the local directory of the sender? if yes, please suggest how can i specify the public key of a receiver also?