aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests
Commit message (Collapse)AuthorAgeFilesLines
* chore: Apply new rector configuration to apps folderCôme Chilliet2025-02-132-11/+17
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-2111-37/+37
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(encryption): Migrate away from Hooks to typed eventsFerdinand Thiessen2024-10-154-422/+454
| | | | | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Louis <louis@chmn.me> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-1513-40/+47
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* test: Fix wrongly mocked methodJoas Schilling2024-10-071-2/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* chore: Apply rector configuration to apps folderCôme Chilliet2024-09-202-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Remove OCP\Files\Storage interface deprecated since version 9Côme Chilliet2024-09-163-8/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-1518-135/+135
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-258-65/+65
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* test: Fix encryption testLouis Chemineau2024-06-061-21/+14
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore: Add SPDX headerAndy Scherzinger2024-05-2918-401/+68
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(CS): Fix coding styleJoas Schilling2024-01-261-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(encryption): Fix deprecated syntax in encryption testsFerdinand Thiessen2024-01-261-1/+7
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-234-4/+4
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Migrate away from ILogger in encryptionCôme Chilliet2023-08-087-20/+23
| | | | | | And modernize code a bit Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Adapt encryption test to change in generateHeaderCôme Chilliet2023-05-251-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Adjust console formatter code to match with Symfony type hintsFerdinand Thiessen2023-04-171-1/+4
| | | | | | | Symfony has added type hints on the `OutputFormatterInterface`, so we must adjust our type hints to match with Symfony. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
* Merge pull request #36351 from ↵Joas Schilling2023-04-141-0/+8
|\ | | | | | | | | nextcloud/bugfix/noid/move-encryption-password-email-to-template Move encrypt-all password email to EmailTemplate
| * Fix unit testsJoas Schilling2023-03-081-0/+8
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #36836 from nextcloud/fix/view-type-cleanupCôme Chilliet2023-04-051-1/+1
|\ \ | | | | | | Tidy up typing in OC\Files\View
| * | Remove unused method getLocalFolderCôme Chilliet2023-04-031-1/+1
| | | | | | | | | | | | | | | | | | It’s not used and not in any OCP interface/class. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | | Merge pull request #37243 from nextcloud/enh/openssl-get-rid-of-rc4Côme Chilliet2023-04-044-31/+67
|\ \ \ | |/ / |/| | Getting rid of openssl_seal and rc4 in server side encryption
| * | Add a test for multiKeyEncrypt/Decrypt methodsCôme Chilliet2023-03-201-4/+15
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Adapt encryption recovery tests to new systemCôme Chilliet2023-03-171-5/+9
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Adapt encryption tests to the new systemCôme Chilliet2023-03-171-19/+40
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | Adapt code to new encryption systemCôme Chilliet2023-03-171-3/+3
| |/ | | | | | | | | | | | | | | | | fileKey gets deleted upon save as it’s stored in shareKeys instead now. We use presence of a fileKey to detect if a file is using the legacy system or the new one, because we do not always have access to header data. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* / add test for unmarking encrypted file on cross storage moveRobin Appelman2023-04-011-0/+85
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #35108 from nextcloud/encryption-fix-versions-allVincent Petry2022-12-161-1/+1
|\ | | | | allow running encryption:fix-encrypted-version for all users
| * allow running encryption:fix-encrypted-version for all usersRobin Appelman2022-11-291-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Replace getSystemValue in encryption appJ0WI2022-12-051-5/+5
|/ | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Adapt test to fixed command output.Côme Chilliet2022-08-041-3/+14
| | | | | | | No user and non-existing user are now correctly treated as two separated cases Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove at() matcher use from encryption testsCôme Chilliet2022-05-243-33/+43
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Save encrypted files in binary formatplumbeo2022-05-041-9/+14
| | | | | | | | | | | | | Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on https://github.com/owncloud/encryption/pull/224 and https://github.com/owncloud/core/pull/38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
* Fix tests on PHP 8.1 for encryption, files_sharing, files_version,Côme Chilliet2021-12-161-1/+4
| | | | | | files_trashbin and theming apps Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix encrypted version to 0 when finding unencrypted fileVincent Petry2021-08-261-0/+40
| | | | | | | | | | | | Whenever the command is run and a "legacy cipher" seems to be detected when the legacy option is disabled, it's highly likely that the file is actually unencrypted but the database contains a encrypted version higher than 0 for some reason. The command now detects this case and automatically sets the encrypted version to 0 so that the file can be read again. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Prevent running FixEncryptedVersion without master keyVincent Petry2021-06-291-0/+46
| | | | | | | Return an error when running occ encryption:fix-encrypted-version when master key encryption is not enabled. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix FixEncryptedVersionTest testVincent Petry2021-06-291-153/+80
| | | | | | | Fixed setup to use EncryptionTrait like other existing tests. Fix expectations to not rely on side effects from previous test cases. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Downstream FixEncryptedVersionTestVincent Petry2021-06-291-0/+373
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0416-17/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix testMorris Jobke2021-05-201-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-162-2/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused dependencies in encryption app setupMorris Jobke2020-11-231-10/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-053-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-243-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22018 from nextcloud/bugfix/noid/harden-key-generationMorris Jobke2020-08-192-5/+51
|\ | | | | Harden SSE key generation
| * Test for locking state in key generationJulius Härtl2020-08-142-5/+51
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Make legacy cipher opt inRoeland Jago Douma2020-08-192-11/+22
|/ | | | | | | | * 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>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-1214-100/+100
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>