Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore of encrypted data fails when not all files are created.
We should check if a file is actually extracted when checking if we encounter an unexpected STREAM_ENCRYPTED_SESSION_DATA. The rctx.cs is setup by a call to crypto_session_decode() and that session lingers until its teared down by close_previous_stream() but that only occurs when the next file is actually extracted. So if we extract one encrypted file and not the one after that the rctx.cs will not be cleared until we hit the next extracted file or the end of the restore. So we should only handle the session at all when we extract the file as otherwise it makes absolutely no sense to even consider the encrypted session data stream at all as we will be skipping the file extract anyway and skip all encrypted data blocks. Fixes #192: Restore of PKI encrypted data fails if some of the files should not be replaced
- Loading branch information
Marco van Wieringen
committed
Feb 17, 2015
1 parent
a5b918a
commit 42fd076
Showing
1 changed file
with
58 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters