Closed martinstenhoff closed 1 year ago
Hi, yes we pretty much just have a big if statement here for each type so we occasionally get ones I haven't thought of yet which cause the same error.
I think this could definitely need some improvement so if you're happy to put in a PR to fix it for use case or to add the else
in then that would be great.
Seems like this issues has been reported before in other places of PgpCore.
In our case it is triggered in the private
async Task DecryptAsync(Stream inputStream, Stream outputStream)
If we change
if (message is PgpOnePassSignatureList)
in PGP.cs L5030 toif (message is PgpOnePassSignatureList || message is PgpSignatureList)
then the file we have received can successfully be decrypted.I don't know how the file has been generated other than it seems to be done by BouncyCastle Java?:
I had a quick look at
private async Task DecryptAndVerifyAsync(Stream inputStream, Stream outputStream)
as well and the following should perhaps be added:But I can't verify that at the moment cause I only have the public key, that I believe was used to sign, in a scanned document and I don't want to transcribe it. I'll update this when I receive it in proper format.