Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double verification error #66 #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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