Do not throw when CAST5 unsupported

While this message may be more helpful, it will break some cases, such
as when there are multiple ciphers that could be used and we can just
skip CAST5 and move on.  Return NULL when CAST5 unsupported, just like
for other unsupported ciphers.
This commit is contained in:
Stephen Paul Weber 2018-07-25 13:48:12 -05:00
parent 43497a15c0
commit 44e1bb2902

View File

@ -159,8 +159,6 @@ class OpenPGP_Crypt_Symmetric {
$cipher = new OpenSSLWrapper("CAST5-CFB");
} else if(defined('MCRYPT_CAST_128')) {
$cipher = new MCryptWrapper(MCRYPT_CAST_128);
} else {
throw new Exception("Unsupported cipher: you must have mcrypt installed to use CAST5");
}
break;
case 4: