Skip to content

Conversation

@homps
Copy link

@homps homps commented Feb 3, 2022

Fixes #66

Nesting inputstreams can result in a child stream reaching its end twice.
For the MDCValidatingInputStream this results in verifying the MDC twice.
PGPEncryptedData#verify doesn't handle being called twice.

decryptNoSignatureValidation_withWrapperStream_works fails without the fix in MDCValidatingInputStream.

Fix with a simple boolean flag to prevent double verification.
Another alternative option would be making a change to PGPEncryptedData#verify.

Nesting inputstreams can result in a child stream reaching its end twice.
For the MDCValidatingInputStream this results in verifying the MDC twice.
PGPEncryptedData#verify doesn't handle being called twice.

Fix with a simple boolean flag to prevent double verification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File with valid MDC can fail MDC verification when stream is wrapped

1 participant