summaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-16 21:56:36 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-16 21:56:36 +0100
commitf3f08cf9103ed6eb227ec7f40be2bdd1f25b8fa1 (patch)
treed03348e59b4d500b5f7197ef3ba6167ae6e2c663 /apps/encryption
parent8b5a1bbe3ead598a81a0fcba4ed03913aadbb923 (diff)
parent3a5f58c9b0555119523c66c55a903d69e36ead6f (diff)
downloadnextcloud-server-f3f08cf9103ed6eb227ec7f40be2bdd1f25b8fa1.tar.gz
nextcloud-server-f3f08cf9103ed6eb227ec7f40be2bdd1f25b8fa1.zip
Merge pull request #23192 from owncloud/make-ancient-users-happy-with-totally-untested-stuff
Fallback for crappy ancient distributions
Diffstat (limited to 'apps/encryption')
-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;
}