Merge pull request #23192 from owncloud/make-ancient-users-happy-with-totally-untested-stuff

Fallback for crappy ancient distributions
This commit is contained in:
Thomas Müller 2016-03-16 21:56:36 +01:00
commit f3f08cf910
1 changed files with 7 additions and 0 deletions

View File

@ -266,6 +266,13 @@ class Crypt {
$cipher = self::DEFAULT_CIPHER; $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; return $cipher;
} }