Project

General

Profile

Bug #1966 » warden-dans.patch

Pavel Kácha, 10/16/2014 04:14 PM

View differences:

warden-server-2.1.new/warden-server/lib/Warden.pm 2014-10-16 14:27:07.000000000 +0200
102 102
  my $der = decode_base64(join("", @a));
103 103
  my $decoded= Crypt::X509->new(cert => $der);
104 104

  
105
  foreach my $tmp (@{$decoded->SubjectAltName}) {
106
    if($tmp =~ s/dNSName=//){
107
      push(@an_array, $DBH->quote($tmp));
105
  if (defined $decoded->SubjectAltName) {
106
    foreach my $tmp (@{$decoded->SubjectAltName}) {
107
      if($tmp =~ s/dNSName=//){
108
        push(@an_array, $DBH->quote($tmp));
109
      }
108 110
    }
109 111
  }
110 112
  my $alt_names = join(',', @an_array);
    (1-1/1)