File Mcrypt-2.5.7.0.diff of Package perl-Mcrypt

--- Mcrypt.pm
+++ Mcrypt.pm
@@ -137,6 +137,10 @@
   $arg{'mode_dir'} = '' unless defined($arg{'mode_dir'});
   my $td = mcrypt_load( $arg{'algorithm'}, $arg{'algorithm_dir'},
 			$arg{'mode'}, $arg{'mode_dir'} );
+  if(!defined($td)) {
+    print STDERR "Couldn't load algorithm $arg{'algorithm'}/$arg{'mode'}\n";
+    return undef;
+  }
   my $mcrypt = bless { TD => $td }, $class;
   $mcrypt->{Verbose} = 1;
   $mcrypt->{Verbose} = $arg{'verbose'} if(defined($arg{'verbose'}));
--- t/prp-block.t
+++ t/prp-block.t
@@ -26,6 +26,7 @@
 sub doit {
   my($method, $alg, $mode, $infile, $outfile) = @_;
   my($td) = Mcrypt::mcrypt_load( $alg, "", $mode, "");
+  print STDERR "Couldn't load algorithm $alg/$mode\n" unless defined($td);
   ok($td, "Loaded $alg/$mode");
   $keysize = Mcrypt::mcrypt_get_key_size($td);
   $ivsize = Mcrypt::mcrypt_get_iv_size($td);
--- t/prp-noblock.t
+++ t/prp-noblock.t
@@ -27,6 +27,7 @@
 sub doit {
   my($method, $alg, $mode, $infile, $outfile) = @_;
   my($td) = Mcrypt::mcrypt_load( $alg, "", $mode, "");
+  print STDERR "Couldn't load algorithm $alg/$mode\n" unless defined($td);
   ok($td, "Loaded $alg/$mode");
   $keysize = Mcrypt::mcrypt_get_key_size($td);
   $ivsize = Mcrypt::mcrypt_get_iv_size($td);