summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-03-12 23:11:31 +0100
committerLukas Reschke <lukas@owncloud.com>2016-03-12 23:11:31 +0100
commit3a5f58c9b0555119523c66c55a903d69e36ead6f (patch)
tree2012c2e027d4203e2e02d81288e7c3463ddf96e9 /apps/encryption/lib
parent5862a067d9d67d3ef70cb064009f81b47ed15efd (diff)
downloadnextcloud-server-3a5f58c9b0555119523c66c55a903d69e36ead6f.tar.gz
nextcloud-server-3a5f58c9b0555119523c66c55a903d69e36ead6f.zip
Fallback for crappy ancient distributions
Fixes https://github.com/owncloud/core/issues/23181
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r--apps/encryption/lib/crypto/crypt.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php
index 645f1ff0547..ca70c88488f 100644
--- a/apps/encryption/lib/crypto/crypt.php
+++ b/apps/encryption/lib/crypto/crypt.php
@@ -266,6 +266,13 @@ class Crypt {
$cipher = self::DEFAULT_CIPHER;
}
+ // Workaround for OpenSSL 0.9.8. Fallback to an old cipher that should work.
+ if(OPENSSL_VERSION_NUMBER < 0x1000101f) {
+ if($cipher === 'AES-256-CTR' || $cipher === 'AES-128-CTR') {
+ $cipher = self::LEGACY_CIPHER;
+ }
+ }
+
return $cipher;
}