Update of /cvsroot/perl-openssl/Crypt/OpenSSL/RSA/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2576/t
Modified Files:
rsa.t
Log Message:
Apply patch from Jim Radford <ra...@bl...> for SHA{224,256,384,512}
support
Index: rsa.t
===================================================================
RCS file: /cvsroot/perl-openssl/Crypt/OpenSSL/RSA/t/rsa.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** rsa.t 6 Jan 2006 15:12:41 -0000 1.6
--- rsa.t 12 Apr 2006 06:05:06 -0000 1.7
***************
*** 5,9 ****
use Crypt::OpenSSL::RSA;
! BEGIN { plan tests => 31 }
sub _Test_Encrypt_And_Decrypt
--- 5,9 ----
use Crypt::OpenSSL::RSA;
! BEGIN { plan tests => 31 + (UNIVERSAL::can("Crypt::OpenSSL::RSA", "use_sha512_hash") ? 3*4 : 0) }
sub _Test_Encrypt_And_Decrypt
***************
*** 92,95 ****
--- 92,113 ----
_Test_Sign_And_Verify($plaintext, $rsa, $rsa_pub);
+ if (UNIVERSAL::can("Crypt::OpenSSL::RSA", "use_sha512_hash")) {
+ $rsa->use_sha224_hash();
+ $rsa_pub->use_sha224_hash();
+ _Test_Sign_And_Verify($plaintext, $rsa, $rsa_pub);
+
+ $rsa->use_sha256_hash();
+ $rsa_pub->use_sha256_hash();
+ _Test_Sign_And_Verify($plaintext, $rsa, $rsa_pub);
+
+ $rsa->use_sha384_hash();
+ $rsa_pub->use_sha384_hash();
+ _Test_Sign_And_Verify($plaintext, $rsa, $rsa_pub);
+
+ $rsa->use_sha512_hash();
+ $rsa_pub->use_sha512_hash();
+ _Test_Sign_And_Verify($plaintext, $rsa, $rsa_pub);
+ }
+
$rsa->use_ripemd160_hash();
$rsa_pub->use_ripemd160_hash();
|