Tomaz Canabrava
d87648c99a
[CSE] Use the metadata as pointer.
2017-12-20 23:30:51 +01:00
Tomaz Canabrava
25d58ccd58
Revert "Store metadata keys as keys"
...
This commit broke decryption.
This reverts commit b9f094cd94
.
2017-12-20 23:16:42 +01:00
Tomaz Canabrava
dd0528037d
[CSE] Generate a random name for the temporary file
2017-12-20 23:09:28 +01:00
Tomaz Canabrava
7e83f0591b
[CSE] Create the Encrypted File on Disk
2017-12-20 22:32:38 +01:00
Tomaz Canabrava
3760b86e07
[CSE] Mobe fileEncryption to a static function
...
and I'll move all of those to a namespace latter.
2017-12-20 22:28:01 +01:00
Tomaz Canabrava
20198c5c7b
Merge branch 'clientSideEncryptionV3' of github.com:nextcloud/client into clientSideEncryptionV3
2017-12-20 22:11:46 +01:00
Roeland Jago Douma
3c301a8282
Add missing FolderMetadata functions
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 22:08:57 +01:00
Roeland Jago Douma
74bc9213c5
Generate encrypted metadata on the fly
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 22:04:26 +01:00
Tomaz Canabrava
679bb1f18e
[CSE] Expose EncryptionHelper
2017-12-20 21:33:25 +01:00
Tomaz Canabrava
14b18b146d
Merge branch 'clientSideEncryptionV3' of github.com:nextcloud/client into clientSideEncryptionV3
2017-12-20 21:29:54 +01:00
Roeland Jago Douma
5e23ca9658
FolderMetaData: store metadataKeys in a QMap
...
* This allows us to pick the right key for files
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 21:25:27 +01:00
Roeland Jago Douma
b9f094cd94
Store metadata keys as keys
...
Don't store them base64 encoded. But store them directly useable
2017-12-20 21:17:41 +01:00
Roeland Jago Douma
c35b57cfba
Parse the files in the metadata
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 20:49:16 +01:00
Tomaz Canabrava
1e899f4172
[CSE] Do not create QPointer from raw pointers
2017-12-20 20:00:59 +01:00
Tomaz Canabrava
0347cf4e9e
[CSE] Store the sharing keys in memory
2017-12-20 19:40:58 +01:00
Roeland Jago Douma
fc73ad7476
Salt should not be hardcoded
...
We append the salt (just like the IV) to the ciphertext of the private
key. This means we also have to split it off properly.
This breaks compartibility with currently stored keys on your server.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 16:07:33 +01:00
Roeland Jago Douma
b924ad7282
Lower mnemonic when generating password
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 15:41:38 +01:00
Roeland Jago Douma
4551bbe0e0
Forget key + cert + mnemonic on account removal
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 15:35:23 +01:00
Roeland Jago Douma
a48a3e0acc
Cleanup old functions
...
Those functions had no use anymore since we store the key and cert in
the keychain. Removed them so we don't use them by accident.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 13:41:13 +01:00
Roeland Jago Douma
ee281963fe
Base64 magic:
...
* metadata keys: bin -> b64 -> enc -> b64
* sharing metadat: string -> b64 -> enc -> b64
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 10:22:35 +01:00
Tomaz Canabrava
ab89231ca2
[CSE] Remove unused debug
2017-12-20 00:25:56 +01:00
Tomaz Canabrava
d26ade1870
[CSE] Fix the result of the decryption
...
However the text still looks like encrypted.
2017-12-20 00:25:39 +01:00
Tomaz Canabrava
a1e6901ecc
[CSE] Decrypt correctly the metadata
...
There's a bug that's returning an empty bytearray, need to look
into that.
2017-12-20 00:20:27 +01:00
Tomaz Canabrava
494ae31de9
[CSE] Fix correct json object
2017-12-19 23:09:39 +01:00
Tomaz Canabrava
a02246dc65
[CSE] Fix Metadata bugs p1
...
The RFC was misleading, I took the chance to fix a few
inconsistencies regarding the QJsonDocument.
2017-12-19 22:47:05 +01:00
Tomaz Canabrava
5609a1dbe8
[CSE] Remove old debug code so I can focus.
2017-12-19 17:02:23 +01:00
Tomaz Canabrava
aa36cc4a5c
[CSE] Reduce probability of conflicts when rebasing
...
Creates a new file/class to handle upload,
propagateuploadencrypted.h/cpp. This should have all the logic to deal
with the encryption and upload.
2017-12-17 22:38:43 +01:00
Tomaz Canabrava
b9cdc8e922
[CSE] Fix the url to delete the metadata
2017-12-17 21:19:32 +01:00
Tomaz Canabrava
23f832caf4
[CSE] Code Cleanup
2017-12-17 19:19:44 +01:00
Tomaz Canabrava
7ef2489f1d
[CSE] Fix infoForFileId
...
We need to traverse the path recursivelly.
2017-12-17 19:14:34 +01:00
Tomaz Canabrava
ce41e3e42f
[CSE] Work the Set Decrypted Bit
2017-12-15 23:32:41 +01:00
Tomaz Canabrava
2e516dfc67
Merge branch 'clientSideEncryptionV3' of github.com:nextcloud/client into clientSideEncryptionV3
2017-12-15 15:05:51 +01:00
Tomaz Canabrava
250c8ff1bf
[CSE] Add job to delete metadata
...
This is needed for the correct functioning of the Set Folder
as Decrypted
2017-12-15 15:02:43 +01:00
Tomaz Canabrava
5607e27f20
[CSE] Actually save the http response result
2017-12-15 14:25:57 +01:00
Tomaz Canabrava
43332d3ac7
[CSE] Properly update UI status to encrypted / decrypted
2017-12-15 14:00:42 +01:00
Roeland Jago Douma
99b4381591
Don't try to decrypt twice
...
The DecryptMetaDataKeys already base64 decoded
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-14 23:11:40 +01:00
Roeland Jago Douma
69a201a62d
Percentencode the json we send so special chars don't cause trouble
...
The + sign was lost in transfer.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-14 23:11:07 +01:00
Roeland Jago Douma
56028759d5
Merge branch 'master' into clientSideEncryptionV3
2017-12-14 20:47:05 +01:00
Roeland Jago Douma
be3afd1291
Add FileEncryptJob and FileDecryptJob
...
This handles encryption and decryption of files.
Just create the job and start off.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-14 16:54:56 +01:00
Tomaz Canabrava
82c07236c1
[CSE] Add new method "infoForFolderId"
...
we need to query the model for the subfolderinfo, but we don't
have the model index, we have the folder id. this returns it.
2017-12-14 14:39:07 +01:00
Julius Härtl
1cedb1919f
Integrate libcloudproviders support
...
This commit integrates support for libcloudproviders
desktop integration API. If build with the library it
will check on startup if the DBus interface is available
and then use it instead of the legacy status icon.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-12-14 11:19:25 +01:00
Roeland Jago Douma
fe4bb52a6d
Merge remote-tracking branch 'oc/master' into oc_up
2017-12-14 10:27:11 +01:00
Christian Kamm
f40cceaf04
Share link: Adjust design of folder sharing permissions #6192
2017-12-14 08:34:44 +01:00
Tomaz Canabrava
c592871f94
[CSE] Do not handle b64 inside of the decrypt function
...
the decrypt function should deal with the raw data always.
2017-12-13 16:37:52 +01:00
rockihack
8a963a67f2
stack-protector is not supported on hppa.
2017-12-13 11:27:48 +01:00
rockihack
586fd346ea
Enable stack-protector-strong on Windows and macOS.
2017-12-13 11:27:48 +01:00
Christian Kamm
e5ed8fc90a
Merge remote-tracking branch 'origin/2.4'
2017-12-13 11:03:24 +01:00
Markus Goetz
75676f8830
Notifications: Propagate "Dismiss" as DELETE to server #5922
...
(cherry picked from commit e86416fff7
)
2017-12-13 11:00:40 +01:00
Tomaz Canabrava
9916583ffa
[CSE] More verbose output
2017-12-12 21:50:30 +01:00
Roeland Jago Douma
25734afd39
First base64 decode
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-12 21:42:37 +01:00