[stable10] Backport of Fix recreate masterkey for hsm#35380
Merged
phil-davis merged 1 commit intostable10from May 30, 2019
Merged
[stable10] Backport of Fix recreate masterkey for hsm#35380phil-davis merged 1 commit intostable10from
phil-davis merged 1 commit intostable10from
Conversation
Fix recreate masterkey for hsm Signed-off-by: Sujith H <sharidasan@owncloud.com>
Contributor
Author
|
Original PR: owncloud/encryption#128 |
Codecov Report
@@ Coverage Diff @@
## stable10 #35380 +/- ##
==============================================
+ Coverage 64.64% 64.66% +0.02%
- Complexity 20093 20100 +7
==============================================
Files 1289 1290 +1
Lines 76947 76968 +21
Branches 1300 1300
==============================================
+ Hits 49739 49770 +31
+ Misses 26824 26814 -10
Partials 384 384
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## stable10 #35380 +/- ##
==============================================
+ Coverage 64.64% 64.66% +0.02%
- Complexity 20093 20100 +7
==============================================
Files 1289 1290 +1
Lines 76947 76968 +21
Branches 1300 1300
==============================================
+ Hits 49739 49770 +31
+ Misses 26824 26814 -10
Partials 384 384
Continue to review full report at Codecov.
|
phil-davis
approved these changes
May 30, 2019
Contributor
phil-davis
left a comment
There was a problem hiding this comment.
Code matches the diffs of the original encryption PR
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix recreate masterkey for hsm
Signed-off-by: Sujith H sharidasan@owncloud.com
Description
When masterkey is enabled with hsm, the recreate mastekey command was failing. The reason for this was Crypt was pointing to wrong class. Meaning instead of
CryptHSM, it was pointing toCrypt. This caused the keys to be generated in the oC instance and hence things were not working. Once the app is re-enabled, the keymanager requires to be pointed toCryptHSMif hsm is enabled. The switch to theCryptis decided here https://github.com/owncloud/encryption/blob/master/lib/AppInfo/Application.php#L136-L149. This pr tries to address this issue.This change also brings usage of Factory for the EncryptAll and DecryptAll. Because the number of arguments to the constructor for the RecreateMasterKey command crossed beyond 16. And that's not something correct. The code is recactored, to bring down the arguments.
Related Issue
Motivation and Context
Fix the RecreateMasterKey command to work with HSM.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: