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
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
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
0a58ea76e5
[CSE] Start the work with an existing metadata
2017-12-12 15:35:53 +01:00
Tomaz Canabrava
0a83d3e743
[CSE] Fix reading the public key for the metadata
...
This broke when we started to use QSslKey and the Qt Keychain
framework.
2017-12-08 11:24:22 +01:00
Tomaz Canabrava
7fe4dd2163
[CSE] Renane GetFolderEncryptStatus to GetFolderEncryptStatusJob
...
it's a network job after all
2017-12-07 18:06:55 +01:00
Tomaz Canabrava
863e86138f
[CSE] Pass the folder to the GetEncryptionStatus
...
Sometimes we are only interested in folders.
2017-12-07 17:32:35 +01:00
Tomaz Canabrava
6f35cbff6b
[CSE] Fetch the Folder information for encryption status
2017-12-04 22:27:13 +01:00
Roeland Jago Douma
0f60deb043
Store and retrieve keys in keychain
...
* Store privatekey, certificate and mnemonic in keychain
* Retrieve private + public key from server
- ask for mnemonic to decrypt private key
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-28 12:36:35 +01:00
Tomaz Canabrava
47b5cd0fbb
[CSE] Shows correctly Encrypt / Decrypt in the menu
2017-11-27 21:19:54 +01:00
Tomaz Canabrava
d2d2df4c75
[CSE] Try to find the webdav url of a folder.
2017-11-27 21:06:38 +01:00
Roeland Jago Douma
ffb9f69cf6
Start with moving data to the keychain
...
* Check for cert + privateKey in keychain
* Work with QSslKey and QSslCertificate
* Abstract reading the BIO's a bit more
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-27 16:21:53 +01:00
Roeland Jago Douma
74c4d27ea0
Indent
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-27 16:12:56 +01:00
Roeland Jago Douma
9cbe795045
Move more encryption functions to encryption helper
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-25 21:43:15 +01:00
Tomaz Canabrava
45d9323653
[CSE] Update encryption status when folder is updated
2017-11-23 16:55:12 +01:00
Tomaz Canabrava
a118419f0c
[CSE] buildfix, use the correct type.
2017-11-21 09:55:44 +01:00
Tomaz Canabrava
d31aa7836a
[CSE] Add job to find what folders are encrypted.
...
This still needs to be correctly setuped in the call chain.
The job returns a QVariantMap with the folder-webdav-url
and the encrypted status.
2017-11-20 21:38:17 +01:00
Tomaz Canabrava
6351c01ee7
[CSE] Remember the token for folders
2017-11-13 17:04:02 +01:00
Tomaz Canabrava
22a2ab8999
[CSE] Start to send the metadata to the server
2017-11-13 16:46:30 +01:00
Tomaz Canabrava
4755b8c8a3
[CSE] More warnings
2017-11-12 13:03:52 +01:00