From 44e1bb2902caaac855da46645cc13fcffe19645a Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 25 Jul 2018 13:48:12 -0500 Subject: [PATCH] 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. --- lib/openpgp_crypt_symmetric.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/openpgp_crypt_symmetric.php b/lib/openpgp_crypt_symmetric.php index 997d530..3f608cb 100644 --- a/lib/openpgp_crypt_symmetric.php +++ b/lib/openpgp_crypt_symmetric.php @@ -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: