version 1.16, 2007/09/13 01:02:52 |
version 1.17, 2007/09/13 16:41:36 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
# $RedRiver: keyring.t,v 1.15 2007/09/12 02:44:36 andrew Exp $ |
# $RedRiver: keyring.t,v 1.16 2007/09/13 00:02:52 andrew Exp $ |
use strict; |
use strict; |
use warnings; |
use warnings; |
|
|
|
|
}, |
}, |
}; |
}; |
|
|
|
my $Num_Tests_Left = 25; |
SKIP: { |
SKIP: { |
if (defined $options->{cipher} && $options->{cipher} > 0) { |
if (defined $options->{cipher} && $options->{cipher} > 0) { |
my $crypt = Palm::Keyring::crypts($options->{cipher}); |
my $crypt = Palm::Keyring::crypts($options->{cipher}); |
skip 'Crypt::CBC not installed', 25 unless |
skip 'Crypt::CBC not installed', $Num_Tests_Left |
eval "require Crypt::CBC"; |
unless eval "require Crypt::CBC"; |
skip 'Crypt::' . $crypt->{name} . ' not installed', 25 unless |
skip 'Crypt::' . $crypt->{name} . ' not installed', $Num_Tests_Left |
eval "require Crypt::$crypt->{name}"; |
unless eval "require Crypt::$crypt->{name}"; |
} |
} |
|
|
if ($options->{version} == 4) { |
if ($options->{version} == 4) { |
skip 'Crypt::DES not installed', 21 unless |
skip 'Crypt::DES not installed', $Num_Tests_Left |
eval " require Crypt::DES "; |
unless eval "require Crypt::DES "; |
skip 'Digest::MD5 not installed', 21 unless |
skip 'Digest::MD5 not installed', $Num_Tests_Left |
eval " require Digest::MD5 "; |
unless eval "require Digest::MD5 "; |
} elsif ($options->{version} == 5) { |
} elsif ($options->{version} == 5) { |
skip 'Digest::HMAC_SHA1 not installed', 21 unless |
skip 'Digest::HMAC_SHA1 not installed', $Num_Tests_Left |
eval " require Digest::HMAC_SHA1 "; |
unless eval "require Digest::HMAC_SHA1 "; |
} |
} |
|
|
ok( $pdb = new Palm::Keyring($options), |
ok( $pdb = new Palm::Keyring($options), |