summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-114-24/+24
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-165-3/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* FIXME use default RC4 methodRoeland Jago Douma2020-12-071-2/+2
| | | | | | * We should pick better default method! Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix encryption testRoeland Jago Douma2020-12-071-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #24288 from ↵Morris Jobke2020-11-231-28/+3
|\ | | | | | | | | nextcloud/techdebt/noid/encryption-setup-dependency-cleanup Remove unused dependencies in encryption app setup
| * Remove unused dependencies in encryption app setupMorris Jobke2020-11-231-28/+3
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | [encryption] Remove dependency fetching inside the constructor and move them ↵Morris Jobke2020-11-221-15/+6
| | | | | | | | | | | | to method call parameters Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Auto-wire remaining encryption app services that depend on ViewMorris Jobke2020-11-221-54/+0
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Auto-wire as much as possible in the encryption appMorris Jobke2020-11-201-93/+0
| | | | | | Also cleans up only non-classname services in the server container Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update ScanLegacyFormat.phpessys2020-11-201-1/+1
| | | Fixed a small typo on line 99.
* Change to full class names for the encryption app DI in preparation of ↵Morris Jobke2020-11-111-44/+44
| | | | | | auto-wiring Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* The encryption decrypt position can be int or stringChristoph Wurst2020-10-132-2/+2
| | | | | | | The public API said string, internally we treated it as int. In reality both are used. Let's reflect that in the documented argument type. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Migrate encryption to the PSR containerChristoph Wurst2020-10-071-74/+77
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-054-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-2410-1/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22018 from nextcloud/bugfix/noid/harden-key-generationMorris Jobke2020-08-193-34/+77
|\ | | | | Harden SSE key generation
| * Fix typo in error message Morris Jobke2020-08-191-1/+1
| | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
| * Harden key generationJulius Härtl2020-08-143-34/+77
| | | | | | | | | | | | | | | | | | | | There might be cases where multiple requests trigger the key generation at the same time and the instance ends up with a non-fitting public/private key pair. Therefore the whole key generation should be locked. Other than that this makes sure that user key generation return values are properly validated. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Add legacy scanning commandRoeland Jago Douma2020-08-191-0/+140
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Make legacy cipher opt inRoeland Jago Douma2020-08-191-1/+16
| | | | | | | | | | | | | | | | * Systems that upgrade have this enabled by default * New systems disable it * We'll have to add some wargning in the setup checks if this is enabled Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Fix some MissingDocblockType or InvalidDocblock warnings.Daniel Kesselberg2020-08-141-2/+1
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* SSE enhancementRoeland Jago Douma2020-08-111-2/+8
| | | | | | | Do not blind concatenate ints. Lets add a _ between them. So that we can distrinquis them properly Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Encryption is ready if master key is enabledJulius Härtl2020-07-211-0/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Also always return in app commandsJoas Schilling2020-06-263-6/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-2913-0/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code according to PSR2Christoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-103-10/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-1023-96/+28
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-103-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove spaces after method or function callChristoph Wurst2020-04-092-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-0917-17/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-314-0/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-271-5/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-251-5/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-264-13/+13
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix Argument 3 passed to OCA\Encryption\Recovery::__construct() must be an ↵Daniel Kesselberg2019-12-092-4/+0
| | | | | | instance of OCA\Encryption\KeyManager Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Update license headersChristoph Wurst2019-12-0526-26/+47
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-2219-23/+19
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix wrongly mixed mock objects in encryption testsJoas Schilling2019-09-152-33/+19
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make sure maintenance mode is always casted to boolJoas Schilling2019-02-221-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* improve variable namingBjoern Schiessle2018-11-301-4/+4
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* in case 'encryption_skip_signature_check' was set to true we accept if the ↵Bjoern Schiessle2018-11-271-1/+3
| | | | | | file doesn't has a signature Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Allow to disable the signature checkBjoern Schiessle2018-11-271-1/+7
| | | | | | This allows you to recover encryption files even if the signature is broken Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* skip already encrypted files on encrypt all commandBjoern Schiessle2018-10-241-0/+6
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Adding a check to see if keyFileContents is empty:Stefan Weiberg2018-08-211-0/+4
| | | | | | | | | * this fixes a download error and an exception if the data content for encryption is empty * #3958: for recovering encrypted files with a damaged signature this is necessary in addition to turning the signature check off Signed-off-by: Stefan Weiberg <sweiberg@suse.com>
* add occ command to recover encrypted files in case of password lostBjoern Schiessle2018-08-162-2/+134
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Merge pull request #10397 from nextcloud/encryption-s3-fixBjörn Schießle2018-08-081-1/+0
|\ | | | | make file cache updates more robust