Commit graph

11770 commits

Author SHA1 Message Date
Tomaz Canabrava
e8849a2cf9 [CSE] Save the relation of the file / encrypted file names on the db 2018-01-28 22:26:07 +01:00
Roeland Jago Douma
11946d9ef8
Bump
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-28 20:21:12 +01:00
Roeland Jago Douma
3c084bb6eb
Bump drone image
* Bump to 16.04 since 14.04 doesn't auto build here due to openssl fu
* No more gcc7 since gcc5 is new enough

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-28 20:10:04 +01:00
Tomaz Canabrava
e9a7a56359 [CSE] Store the encrypted file name on the SyncFilePtr 2018-01-28 18:37:01 +01:00
Tomaz Canabrava
a003d216a5 [CSE] Implementation of the setE2eRelation
This call creates a new entry on the database for e2e.
2018-01-28 18:05:28 +01:00
Tomaz Canabrava
32eaaa0601 [CSE] GetMangledName implementation 2018-01-28 17:50:10 +01:00
Tomaz Canabrava
be817748f8 [CSE] Reset the new Queries on close 2018-01-28 17:46:20 +01:00
Tomaz Canabrava
b909bb6977 [CSE] Change the Database to handle Encrypted Files
Create a table to hold the information between the
real file name and the fake file name
2018-01-28 16:41:07 +01:00
Roeland Jago Douma
4892b0ec43
Properly fill EncryptedFile
* Add a mimetype (mobile clients need this)
* Add the tag unencoded as we encode it when we send the metadata
already

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-23 21:31:00 +01:00
Roeland Jago Douma
21d55c3321
No sharing in metadata yet and PEM as PKCS#8
* Don't store the metadata yet this crashes android
  - Yes android should be fixed but for now this is quicker ;)
* QSslKey exports PEM as PKCS#1
  - This is not handled properly on android so use PKCS#8 helper

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-23 21:02:52 +01:00
Roeland Jago Douma
a2b8724adf
Hacky way to drop duplicates (we should really use the fileid!)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-23 11:58:05 +01:00
Roeland Jago Douma
bb85e2ab2c
Reuse existing EncryptedFile
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-23 11:36:15 +01:00
Roeland Jago Douma
33beb7aade
Don't generate values after we use them
* Pregerenate IV
* Pregenerate key
* Pregenerate filename

TODO:
  - Reuse existing file entries and update (we might need logic in the
  metadatahandling to do this properly).
2018-01-22 15:24:54 +01:00
Tomaz Canabrava
cae6bbc853 [CSE] Start the download process 2018-01-22 14:08:32 +01:00
Tomaz Canabrava
cf2fa2ea35 [CSE] Get the tag of the encrypted file to feed the metadata
Also, change the logging cattegory
2018-01-21 21:59:19 +01:00
Tomaz Canabrava
5d6817e165 [CSE] Save the tag while encrypting. 2018-01-21 21:49:24 +01:00
Tomaz Canabrava
261cedce3f [CSE] Do not quit if encryption fails
It's much more reasonable to return failure and handle it.
2018-01-21 21:40:53 +01:00
Tomaz Canabrava
2d872f2a8d [CSE] Add missing files 2018-01-21 21:26:05 +01:00
Tomaz Canabrava
009562da1e [CSE] Remove lambas with lambdas
It's hard to reason with lambdas with lambdas, so transform
them into actuall signal / slot calls.
2018-01-21 21:25:06 +01:00
Tomaz Canabrava
d5a76ea70d [CSE] Remove the DecryptionJob
Transform it into an Static function - it was blocking anyway
and this way it's easier to transform it into a thread in the
future.
2018-01-21 21:24:02 +01:00
Tomaz Canabrava
4a2d0ab9e9 [CSE] Move code to display minemonic out of the libsync
The libsync should not contain Qt Widget related code.
2018-01-21 19:50:40 +01:00
Roeland Jago Douma
6d613fb4d5
Quick and dirty way of showing the mnemonic for now
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-18 22:10:55 +01:00
Roeland Jago Douma
5722d29e42
Double encode the metadatakeys
This is required by a misunderstanding of the RFC.
You need to resetup your test user.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-15 11:26:06 +01:00
Roeland Jago Douma
99aebf292c
Yet another drone image
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-12 19:36:09 +01:00
Roeland Jago Douma
d1c84fd859
Bump drone docer used for appimage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-12 15:21:30 +01:00
Daniel Nicoletti
a7ee1a95a6 Download and decrypt file if parent folder is marked as encrypted 2018-01-08 21:08:31 +01:00
Daniel Nicoletti
3abbbab6a0 Faster way to detecting CSE capability 2018-01-08 21:08:31 +01:00
Daniel Nicoletti
e2c895e61f Fix encrypted file location on the server 2017-12-29 17:28:35 +01:00
Daniel Nicoletti
ca92c46970 Add category logging to PropagateUploadEncrypted 2017-12-29 17:28:35 +01:00
Daniel Nicoletti
50916bcda5 Mark ClientSideEncryption::isFolderEncrypted() as const 2017-12-29 17:28:35 +01:00
Daniel Nicoletti
c6491d50bb Replace deprecated Qt API usage 2017-12-29 17:28:35 +01:00
Daniel Nicoletti
fdc96d3a4f Fix deprecated use of QUrl::setQueryItems() 2017-12-29 17:28:35 +01:00
Daniel Nicoletti
e06e04ee93 Fix parsing list of encrypted folders 2017-12-29 17:28:35 +01:00
Tomaz Canabrava
7d68fa17e7
Merge pull request #107 from dantti/clientSideEncryptionV3
Prepend "nextcloud" for all logging categories
2017-12-29 11:52:40 +01:00
Daniel Nicoletti
a63d34f870 Prepend "nextcloud" for all logging categories
Thus making easier to exclude logging from kio, qt
and only enable "nextcloud.*"
2017-12-28 17:33:10 -02:00
Tomaz Canabrava
c772857054
Merge pull request #106 from dantti/clientSideEncryptionV3
Fix URL in dialog that requests password
2017-12-28 13:08:33 +01:00
Daniel Nicoletti
c963259bfb Fix URL in dialog that requests password
An URL that had base like "http://localhost/nextcloud/"
would get the last slash '/' removed and then appended
with "index.php..." resulting in
http://localhost/nextcloudindex.php
2017-12-28 10:00:17 -02:00
Tomaz Canabrava
efc039863b [CSE] Tons of debugs. 2017-12-24 17:08:04 +01:00
Tomaz Canabrava
da9f1c412d [CSE] Remove debug 2017-12-24 16:36:57 +01:00
Tomaz Canabrava
06c34ed617 [CSE] Assorted fixes
- Unlock the folder even on error
- Use the correct name of the file for upload
2017-12-24 16:30:39 +01:00
Tomaz Canabrava
60ef722b60 [CSE] Update the metadata when a file is being uploaded. 2017-12-22 23:05:39 +01:00
Tomaz Canabrava
e70bf44aaf [CSE] Fix the generation of the data for the update Metadata 2017-12-22 22:39:45 +01:00
Tomaz Canabrava
124a7253a4 [CSE] Create job to Update Metadata 2017-12-22 22:02:16 +01:00
Roeland Jago Douma
65dfc47ac7
Set public key once certificate is retrieved
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-21 10:20:03 +01:00
Roeland Jago Douma
0dc7831336
Key is already base64 decoded
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-21 09:49:31 +01:00
Tomaz Canabrava
b72113a53d [CSE] Prepare the beginning of the upload.
I still need to send the metadata.
2017-12-21 00:35:23 +01:00
Tomaz Canabrava
df5fd3fbe6 [CSE] More debug output, fix input file path 2017-12-21 00:00:27 +01:00
Tomaz Canabrava
7be5f0a736 [CSE] Update the finished signal 2017-12-20 23:36:49 +01:00
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