Update of /cvsroot/perl-openssl/Crypt/OpenSSL/RSA/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7531/t
Modified Files:
bignum.t
Log Message:
fully flush error queue on failure
Index: bignum.t
===================================================================
RCS file: /cvsroot/perl-openssl/Crypt/OpenSSL/RSA/t/bignum.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** bignum.t 19 Feb 2004 00:36:49 -0000 1.6
--- bignum.t 19 Feb 2004 02:19:40 -0000 1.7
***************
*** 6,9 ****
--- 6,16 ----
my $bignum_missing;
+ BEGIN
+ {
+ eval { require Crypt::OpenSSL::Bignum; };
+ $bignum_missing = $@;
+ plan(tests => $bignum_missing ? 0 : 64);
+ }
+
sub check_datum
{
***************
*** 30,47 ****
}
- BEGIN
- {
- eval { require Crypt::OpenSSL::Bignum; };
- $bignum_missing = $@;
- if($bignum_missing)
- {
- plan tests => 0;
- }
- else
- {
- plan test => 63;
- }
- }
-
unless ($bignum_missing)
{
--- 37,40 ----
***************
*** 104,108 ****
--- 97,109 ----
$e, $d, undef, $q);
};
+ ok($@ =~ /OpenSSL error: p not prime/);
+ #try again, to make sure the error queue was properly flushed
+ eval
+ {
+ Crypt::OpenSSL::RSA->new_key_from_parameters
+ ($n->sub(Crypt::OpenSSL::Bignum->one()),
+ $e, $d, undef, $q);
+ };
ok($@ =~ /OpenSSL error: p not prime/);
}
|