Update of /cvsroot/perl-openssl/Crypt/OpenSSL/RSA/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21248/t
Modified Files:
bignum.t
Log Message:
improve error handling, try to not leak memory on errors
Index: bignum.t
===================================================================
RCS file: /cvsroot/perl-openssl/Crypt/OpenSSL/RSA/t/bignum.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** bignum.t 18 Feb 2004 21:37:32 -0000 1.5
--- bignum.t 19 Feb 2004 00:36:49 -0000 1.6
***************
*** 40,44 ****
else
{
! plan test => 62;
}
}
--- 40,44 ----
else
{
! plan test => 63;
}
}
***************
*** 97,99 ****
--- 97,108 ----
$rsa = Crypt::OpenSSL::RSA->new_key_from_parameters($n, $e, undef, $p);
check_key_parameters($rsa, $n, $e, $d, $p, $q, $dmp1, $dmq1, $iqmp);
+
+ eval
+ {
+ Crypt::OpenSSL::RSA->new_key_from_parameters
+ ($n->sub(Crypt::OpenSSL::Bignum->one()),
+ $e, $d, undef, $q);
+ };
+
+ ok($@ =~ /OpenSSL error: p not prime/);
}
|