/[pdpsoft]/nl.nikhef.pdp.fetchcrl/tags/fetch-crl-3.0.18/TrustAnchor.pm
ViewVC logotype

Diff of /nl.nikhef.pdp.fetchcrl/tags/fetch-crl-3.0.18/TrustAnchor.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1763 by davidg, Fri Jun 11 18:45:56 2010 UTC revision 1767 by davidg, Fri Jun 11 19:44:35 2010 UTC
# Line 184  sub loadAnchor($$) { Line 184  sub loadAnchor($$) {
184           nametemplate_der nametemplate_pem           nametemplate_der nametemplate_pem
185           cadir catemplate statedir           cadir catemplate statedir
186        / ) {        / ) {
187      $self->{$key} =      $self->{$key} = $self->{$key} ||
188        $::cnf->{$self->{"alias"}}->{$key} ||        $::cnf->{$self->{"alias"}}->{$key} ||
189        $::cnf->{$self->{"anchorname"}}->{$key} ||        $::cnf->{$self->{"anchorname"}}->{$key} ||
190        $::cnf->{_}->{$key} or delete $self->{$key};        $::cnf->{_}->{$key} or delete $self->{$key};
# Line 269  sub loadCAfiles($) { Line 269  sub loadCAfiles($) {
269    my $self         = shift;    my $self         = shift;
270    my $idx = 0;    my $idx = 0;
271    
272    -d $self->{"cadir"} or    # try to find a CA dir, whatever it takes, almost
273      $::log->err("CA directory",$self->{"cadir"},"does not exist") and    my $cadir = $self->{"cadir"} || $self->{"infodir"};
274    
275      -d $cadir or
276        $::log->err("CA directory",$cadir,"does not exist") and
277      return 0;      return 0;
278    
279    @{$self->{"cafile"}} = ();    @{$self->{"cafile"}} = ();
# Line 278  sub loadCAfiles($) { Line 281  sub loadCAfiles($) {
281      my $cafile;      my $cafile;
282      foreach my $catpl ( split /&/, $self->{"catemplate"} ) {      foreach my $catpl ( split /&/, $self->{"catemplate"} ) {
283        $catpl =~ s/\@R\@/$idx/g;        $catpl =~ s/\@R\@/$idx/g;
284        -e $self->{"cadir"}.'/'.$catpl and        -e $cadir.'/'.$catpl and
285          $cafile = $self->{"cadir"}.'/'.$catpl and last;          $cafile = $cadir.'/'.$catpl and last;
286      }      }
287      defined $cafile or do {      defined $cafile or do {
288        $idx or do $::log->err("Cannot find any CA for",        $idx or do $::log->err("Cannot find any CA for",
289                                $self->{"alias"},"in",$self->{"cadir"});                                $self->{"alias"},"in",$cadir);
290        return $idx?1:0;        return $idx?1:0;
291      };      };
292      push @{$self->{"cafile"}}, $cafile;      push @{$self->{"cafile"}}, $cafile;

Legend:
Removed from v.1763  
changed lines
  Added in v.1767

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28