2008-04-29 12:55:25 +00:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
require 5.008;
|
|
|
|
BEGIN { $^W = 1; }
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
chdir("md5") or die "chdir testdir failed: $!\n";
|
|
|
|
|
|
|
|
require TestDriver;
|
|
|
|
|
|
|
|
my $td = new TestDriver('md5');
|
|
|
|
|
2019-11-06 02:29:34 +00:00
|
|
|
my @providers = ();
|
|
|
|
if (exists $ENV{'QPDF_CRYPTO_PROVIDER'})
|
|
|
|
{
|
|
|
|
push(@providers, $ENV{'QPDF_CRYPTO_PROVIDER'});
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
open(Q, "qpdf --show-crypto|") or die;
|
|
|
|
while (<Q>)
|
|
|
|
{
|
|
|
|
s/\s+$//s;
|
|
|
|
push(@providers, $_);
|
|
|
|
}
|
|
|
|
close(Q);
|
|
|
|
}
|
|
|
|
foreach my $p (@providers)
|
|
|
|
{
|
|
|
|
$ENV{'QPDF_CRYPTO_PROVIDER'} = $p;
|
2008-04-29 12:55:25 +00:00
|
|
|
|
2019-11-06 02:29:34 +00:00
|
|
|
$td->runtest("md5 ($p)",
|
|
|
|
{$td->COMMAND => "md5"},
|
|
|
|
{$td->FILE => "md5.out",
|
|
|
|
$td->EXIT_STATUS => 0},
|
|
|
|
$td->NORMALIZE_NEWLINES);
|
|
|
|
}
|
|
|
|
|
|
|
|
$td->report(scalar(@providers));
|