]> git.openstreetmap.org Git - dns.git/blobdiff - bin/mksshfp
Limit the number of SSHFP records we generate
[dns.git] / bin / mksshfp
index e4bc8ed30c84f293c680e46daaba43bac18a3a8e..7c0f518034332dd72c1111ea9bb6f79bf12068ff 100755 (executable)
@@ -18,7 +18,11 @@ if (-f "/etc/ssh/ssh_known_hosts")
             my $type = $3;
             my $value = $4;
 
-            print SSHFP_JS qq|  SSHFP("${host}", ${algorithm}, ${type}, "${value}"),\n|;
+            if ($type == 2 &&
+                ($algorithm == 3 || $algorithm == 4))
+            {
+                print SSHFP_JS qq|  SSHFP("${host}", ${algorithm}, ${type}, "${value}"),\n|;
+            }
         }
         else
         {