diff options
author | Werner Koch <wk@gnupg.org> | 2008-10-30 10:23:17 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-10-30 10:23:17 +0000 |
commit | 961c8915316510f7c5fd2cb3dc5ae9b8000d91eb (patch) | |
tree | de4fb1596e82976bd4a0616f634ab977e534f978 /tests/cavs_driver.pl | |
parent | 3f204a1533f15446f3579e648f0cf70639c4bc49 (diff) | |
download | libgcrypt-961c8915316510f7c5fd2cb3dc5ae9b8000d91eb.tar.gz |
Fix ECB mode test
Diffstat (limited to 'tests/cavs_driver.pl')
-rwxr-xr-x | tests/cavs_driver.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/cavs_driver.pl b/tests/cavs_driver.pl index 8556a81d..4cb9474a 100755 --- a/tests/cavs_driver.pl +++ b/tests/cavs_driver.pl @@ -289,7 +289,9 @@ sub libgcrypt_encdec($$$$$) { my $enc = (shift) ? "encrypt" : "decrypt"; my $data=shift; - my $program="fipsdrv --no-fips --key $key --iv $iv --algo $cipher $enc"; + $iv = "--iv $iv" if ($iv); + + my $program="fipsdrv --key $key $iv --algo $cipher $enc"; return pipe_through_program($data,$program); } @@ -333,7 +335,7 @@ sub libgcrypt_hash($$) { my $pt = shift; my $hashalgo = shift; - my $program = "fipsdrv --no-fips --algo $hashalgo digest"; + my $program = "fipsdrv --algo $hashalgo digest"; die "ARCFOUR not available for hashes" if $opt{'R'}; return pipe_through_program($pt, $program); @@ -346,7 +348,9 @@ sub libgcrypt_state_cipher($$$$$) { my $key = shift; my $iv = shift; - my $program="fipsdrv --no-fips --binary --key ".bin2hex($key)." --iv ".bin2hex($iv)." --algo '$cipher' --chunk '$bufsize' $enc"; + $iv = "--iv $iv" if ($iv); + + my $program="fipsdrv --binary --key ".bin2hex($key)." $iv ".bin2hex($iv)." --algo '$cipher' --chunk '$bufsize' $enc"; return $program; } @@ -364,7 +368,7 @@ sub libgcrypt_hmac($$$$) { my $msg = shift; my $hashtype = shift; - my $program = "fipsdrv --no-fips --key $key --algo $hashtype hmac-sha"; + my $program = "fipsdrv --key $key --algo $hashtype hmac-sha"; return pipe_through_program($msg, $program); } |