aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2022-12-04 21:36:10 +0100
committerJ0WI <J0WI@users.noreply.github.com>2022-12-05 14:30:58 +0100
commit71e490090f52bc9b12f7b07f002846518326be38 (patch)
treea147ce857b2131cc53e82854e518d69145a35bff /apps/encryption/lib
parente36e92bacefeac0cf28888b3e528ab97cbc2ed9f (diff)
downloadnextcloud-server-71e490090f52bc9b12f7b07f002846518326be38.tar.gz
nextcloud-server-71e490090f52bc9b12f7b07f002846518326be38.zip
Replace getSystemValue in encryption app
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r--apps/encryption/lib/Command/FixEncryptedVersion.php2
-rw-r--r--apps/encryption/lib/Crypto/Crypt.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/encryption/lib/Command/FixEncryptedVersion.php b/apps/encryption/lib/Command/FixEncryptedVersion.php
index ab9cc528c54..cace88476f8 100644
--- a/apps/encryption/lib/Command/FixEncryptedVersion.php
+++ b/apps/encryption/lib/Command/FixEncryptedVersion.php
@@ -95,7 +95,7 @@ class FixEncryptedVersion extends Command {
}
protected function execute(InputInterface $input, OutputInterface $output): int {
- $skipSignatureCheck = $this->config->getSystemValue('encryption_skip_signature_check', false);
+ $skipSignatureCheck = $this->config->getSystemValueBool('encryption_skip_signature_check', false);
$this->supportLegacy = $this->config->getSystemValueBool('encryption.legacy_format_support', false);
if ($skipSignatureCheck) {
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php
index f8ba3d69b80..7429c613b52 100644
--- a/apps/encryption/lib/Crypto/Crypt.php
+++ b/apps/encryption/lib/Crypto/Crypt.php
@@ -275,7 +275,7 @@ class Crypt {
}
// Get cipher either from config.php or the default cipher defined in this class
- $cipher = $this->config->getSystemValue('cipher', self::DEFAULT_CIPHER);
+ $cipher = $this->config->getSystemValueString('cipher', self::DEFAULT_CIPHER);
if (!isset(self::SUPPORTED_CIPHERS_AND_KEY_SIZE[$cipher])) {
$this->logger->warning(
sprintf(
@@ -524,7 +524,7 @@ class Crypt {
* @throws GenericEncryptionException
*/
private function checkSignature($data, $passPhrase, $expectedSignature) {
- $enforceSignature = !$this->config->getSystemValue('encryption_skip_signature_check', false);
+ $enforceSignature = !$this->config->getSystemValueBool('encryption_skip_signature_check', false);
$signature = $this->createSignature($data, $passPhrase);
$isCorrectHash = hash_equals($expectedSignature, $signature);
@@ -605,7 +605,7 @@ class Crypt {
* @throws GenericEncryptionException
*/
private function hasSignature($catFile, $cipher) {
- $skipSignatureCheck = $this->config->getSystemValue('encryption_skip_signature_check', false);
+ $skipSignatureCheck = $this->config->getSystemValueBool('encryption_skip_signature_check', false);
$meta = substr($catFile, -93);
$signaturePosition = strpos($meta, '00sig00');