Better salt
[mirror/userdir-ldap-cgi.git] / machines.cgi
index 4108fff..ba84f18 100755 (executable)
@@ -11,7 +11,7 @@ use strict vars;
 #use Apache::Registry;
 use CGI;
 use Util;
-use Net::LDAP qw(:all);
+use Net::LDAP qw(LDAP_SUCCESS LDAP_PROTOCOL_ERROR);
 use Fcntl;
 use POSIX;
 use MIME::Base64;
@@ -74,7 +74,8 @@ sub sshfingerprint {
     return '' if (!$key);
 
     my @field = split(/ /, $key);
-    return '' if $field[0] ne 'ssh-dss' and $field[0] ne 'ssh-rsa';
+    my %keytypes = map {$_=>1} (qw{ssh-dss ssh-rsa ecdsa-sha2-nistp256});
+    return '' unless $keytypes{$field[0]};
     return '' if !$field[1];
     my $fpr = md5_hex(decode_base64($field[1]));
     my $hrfpr = $field[0] . " " . substr($fpr,0,2,"");
@@ -210,7 +211,7 @@ if ($output{havehostdata}) {
 } else {
   # display summary info
   $hostdetails = "<h1>Summary</h1>\n";
-  $hostdetails .= "<table border=\"1\" width=\"90%\">\n<tr>";
+  $hostdetails .= "<table class=\"debform\" border=\"1\" width=\"90%\">\n<tr>";
   foreach $key (@summaryorder) {
     if ($sortby ne $key) {
       $hostdetails .= "<th><a href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";