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
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
Tomaz Canabrava
ea3558faf6
[CSE] Fix strings
2017-12-12 21:29:06 +01:00
Tomaz Canabrava
159c0e138f
[CSE] Add a DecryptAsync method
...
Also, cleanup a bit of the old calls. One particular difference
is that I used to set padding to 1 and it should actually be
PKCS1_OAEP_PADDING
2017-12-12 21:23:02 +01:00
Tomaz Canabrava
aca298ca64
[CSE] Be explicit that async encryption uses publicKey
2017-12-12 20:14:31 +01:00
Tomaz Canabrava
2127b2629d
[CSE] Move encryption related network jobs to its own file
...
Move encryption related network jobs to it's own file,
the original file was starting to be just way too big.
2017-12-12 19:36:47 +01:00
Tomaz Canabrava
f6f078d1ee
[CSE] Rename Variable
2017-12-12 16:15:05 +01:00
Tomaz Canabrava
ce37235cc4
[CSE] Retrieve the Private Key from the KeyChain
...
This fixes one thing and exposes a bug.
the MetadataKeys are not being correctly unencrypted.
2017-12-12 16:09:49 +01:00
Tomaz Canabrava
0a58ea76e5
[CSE] Start the work with an existing metadata
2017-12-12 15:35:53 +01:00
Olivier Goffart
02283fc686
Merge pull request #6224 from owncloud/deprecated
...
Remove use of deprecated Qt API
2017-12-12 11:48:04 +01:00
Tomaz Canabrava
e6f835d138
[CSE] Unlock the folder after a lock
...
This makes sure the folder will be unlocked for next tests
2017-12-12 11:26:54 +01:00
Tomaz Canabrava
33b1fcfe66
Merge branch 'master' into clientSideEncryptionV3
2017-12-12 10:46:43 +01:00