diff -Naur warden-server-2.1/warden-server/lib/Warden.pm warden-server-2.1.new/warden-server/lib/Warden.pm --- warden-server-2.1/warden-server/lib/Warden.pm 2013-09-10 12:08:12.000000000 +0200 +++ warden-server-2.1.new/warden-server/lib/Warden.pm 2014-10-16 14:27:07.000000000 +0200 @@ -102,9 +102,11 @@ my $der = decode_base64(join("", @a)); my $decoded= Crypt::X509->new(cert => $der); - foreach my $tmp (@{$decoded->SubjectAltName}) { - if($tmp =~ s/dNSName=//){ - push(@an_array, $DBH->quote($tmp)); + if (defined $decoded->SubjectAltName) { + foreach my $tmp (@{$decoded->SubjectAltName}) { + if($tmp =~ s/dNSName=//){ + push(@an_array, $DBH->quote($tmp)); + } } } my $alt_names = join(',', @an_array);