Fallback for crappy ancient distributions

Fixes https://github.com/owncloud/core/issues/23181
remotes/origin/smb_changes_8_to_9
Lukas Reschke 2016-03-12 23:11:31 +07:00
parent b580d26270
commit cdadd4cd1b
1 changed files with 7 additions and 0 deletions

@ -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;
}