1
0
Fork 0
Commit Graph

92 Commits

Author SHA1 Message Date
Felix Weilbach 8a8d488454 Add dialog to set user status
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-09 11:18:22 +02:00
allexzander ba73b6d914 VFS + E2EE. Improved data alignment and unit tests for StreamingDecryptor. Refactoring and renaming for readability.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander 2c78925acb VFS + E2EE VFS implicit hydration of E2EE files.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
Matthieu Gallien 2bc72592a0 fix review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-01 14:40:25 +02:00
Matthieu Gallien 698d5f19ba download server public key and check user certificate against it
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-01 14:07:27 +02:00
Matthieu Gallien 7fb09a8163 check e2ee public key against private one
should ensure we have matching private/public keys

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-05-27 07:26:48 +00:00
Kevin Ottens d20fc1a6ce Remove unused method
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 11:20:13 +00:00
Kevin Ottens 4168c0d082 Avoid keeping Account alive via a shared ptr in ClientSideEncryption
This account object was really only used during the initialization phase
or for forgetting the sensitive data. So let's receive it as parameter
there and pass it on from job to job as needed.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 11:20:13 +00:00
allexzander 4ed7feab2b Implement nested items removal when removing root encrypted folder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-11 21:12:58 +02:00
Kevin Ottens b2533e6451
Remove encrypt status job fetching from ClientSideEncryption
This is now unused.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens 580b36fe20
Remove unused methods on ClientSideEncryption
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:59:23 +01:00
Kevin Ottens 399b97442e
Factor out the logic to start a new e2ee status job
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-21 10:00:58 +02:00
Kevin Ottens 9aeb7046d2
Start managing a list of GetFolderEncryptStatusJob
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-10-21 10:00:58 +02:00
Kevin Ottens 595eb78c8a
Move the private key salt handling in its own function
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-10 13:13:19 +02:00
Kevin Ottens 26b88131cc
Add unit tests for the encryption helpers
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-10 13:13:19 +02:00
Kevin Ottens 287a130044 Also deliver the encrypted status via the ClientEncryption signal
This will turn useful for other consumers of that data. The alternative
would be to expose a method breaking all form of encapsulation.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-06 05:27:14 +00:00
Kevin Ottens 3e13919c35 Use QHash instead of QMap
This is not only a question of performances in our case (complexity
being better on look ups). It also provides a few more services.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-30 11:29:08 +02:00
Kevin Ottens 5f611d6e39 Get ClientSideEncryption to notify when folder info fetch is done
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-30 11:29:08 +02:00
Ivan Čukić c800d9149e Show a broken lock icon for unencrypted subdirectory
The E2E application allows creating unencrypted subdirectories
in an encrypted parent. This is a big privacy problem.

This patch shows a red broken lock icon for these subdirectories
in the NC client UI.

Signed-off-by: Ivan Čukić <ivan.cukic@kde.org>
2020-06-02 15:50:18 +00:00
Ivan Čukić 7af786fde9 Added a nice UI for the E2E-enabled account first connect
Instead of immediately popping up the mnemonic dialogue,
only show a notification bar on the account setup page.

For the cases where the user does not want to use E2E,
this is significantly less intrusive than the old approach.
2019-05-09 00:37:24 +02:00
Camila San 45ff3385c7
Uses QByteArray to store private key.
Removes QSslkey. See #268

Signed-off-by: Camila San <hello@camila.codes>
2018-10-15 00:21:08 +02:00
Roeland Jago Douma 48a6ef37b2
Add a button to E2E accounts to show the mnemonic
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-21 19:52:27 +02:00
Roeland Jago Douma dc41f8a16e Fix windows build
* Reorder openssl header import
* not => !

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-08 16:53:56 +02:00
Daniel Nicoletti b12066f1aa Properly remove encryption data from JSON of deleted file 2018-04-09 13:23:52 +02:00
Tomaz Canabrava b4b3e422de Handle gracefully failures in file decryption 2018-03-27 09:18:54 +02:00
Tomaz Canabrava 7da0764b8d Don't class what's not a class 2018-02-18 01:23:59 +01:00
Tomaz Canabrava 5faeca1b82 Move BIO2ByteArray to annonymous namespace
This has no use outside of the clientsidenecryption.cpp
2018-02-18 01:04:44 +01:00
Roeland Jago Douma 1eb7ba72f0
Use standardized filename
See https://github.com/nextcloud/end_to_end_encryption_rfc/issues/13

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-02-09 11:40:06 +01:00
Roeland Jago Douma d85c2bf025
Fix building on windows
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-30 11:10:03 +01:00
Roeland Jago Douma 296f46356e
If the metadata is empty we should store (and not update).
Android only creates the metadata file when the first encrypted file is
added. We assumed it would be there.

This hacky code makes us store the metadata if there wasn't any yet.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-29 22:04:50 +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
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 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
Daniel Nicoletti 50916bcda5 Mark ClientSideEncryption::isFolderEncrypted() as const 2017-12-29 17:28:35 +01:00
Tomaz Canabrava dd0528037d [CSE] Generate a random name for the temporary file 2017-12-20 23:09:28 +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 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
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
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 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
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 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 43332d3ac7 [CSE] Properly update UI status to encrypted / decrypted 2017-12-15 14:00:42 +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