/[pdpsoft]/nl.nikhef.pdp.fetchcrl/trunk/CRL.pm
ViewVC logotype

Diff of /nl.nikhef.pdp.fetchcrl/trunk/CRL.pm

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

revision 2277 by davidg, Mon Apr 11 06:54:34 2011 UTC revision 2420 by davidg, Fri Sep 9 11:18:11 2011 UTC
# Line 65  sub setData($$) { Line 65  sub setData($$) {
65    # extract other data from the pem blob with openssl    # extract other data from the pem blob with openssl
66    (my $statusdata,$errormsg) =    (my $statusdata,$errormsg) =
67      $openssl->Exec3($pemdata, qw/ crl      $openssl->Exec3($pemdata, qw/ crl
68        -noout -issuer -sha1 -fingerprint -lastupdate -nextupdate/);        -noout -issuer -sha1 -fingerprint -lastupdate -nextupdate -hash/);
69    defined $statusdata or do {    defined $statusdata or do {
70      ( my $eline = $errormsg ) =~ s/\n.*//sgm;      ( my $eline = $errormsg ) =~ s/\n.*//sgm;
71      $::log->warn("Unable to extract CRL data for",$self->{"name"},$eline);      $::log->warn("Unable to extract CRL data for",$self->{"name"},$eline);
# Line 79  sub setData($$) { Line 79  sub setData($$) {
79      $self->{"lastupdatestr"} = $1;      $self->{"lastupdatestr"} = $1;
80    $statusdata =~ /(?:^|\n)nextUpdate=([^\n]+)\n/ and    $statusdata =~ /(?:^|\n)nextUpdate=([^\n]+)\n/ and
81      $self->{"nextupdatestr"} = $1;      $self->{"nextupdatestr"} = $1;
82      $statusdata =~ /(?:^|\n)([0-9a-f]{8})\n/ and
83        $self->{"hash"} = $1;
84    
85    $self->{"nextupdatestr"} and    $self->{"nextupdatestr"} and
86      $self->{"nextupdate"} = $openssl->gms2t($self->{"nextupdatestr"});      $self->{"nextupdate"} = $openssl->gms2t($self->{"nextupdatestr"});
# Line 105  sub getNextUpdate($) { Line 107  sub getNextUpdate($) {
107  }  }
108    
109  sub getAttribute($$) {  sub getAttribute($$) {
110    my $self = shift or die "Invalid invocation of CRL::getNextUpdate\n";    my $self = shift or die "Invalid invocation of CRL::getAttribute\n";
111    my $key = shift;    my $key = shift;
112    return $self->{$key} or undef;    return $self->{$key} or undef;
113  }  }

Legend:
Removed from v.2277  
changed lines
  Added in v.2420

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