4 open(SSHFP_JS, ">", "include/sshfp.js") || die $!;
6 print SSHFP_JS qq|var SSHFP_RECORDS = [\n|;
8 if (-f "/etc/ssh/ssh_known_hosts")
10 open(SSHFP, "-|","sshfp", "-k", "/etc/ssh/ssh_known_hosts") || die $!;
12 while (my $line = <SSHFP>)
14 if ($line =~ /^(\S+) IN SSHFP (\d+) (\d+) ([0-9A-F]+)$/)
22 ($algorithm == 3 || $algorithm == 4))
24 print SSHFP_JS qq| SSHFP("${host}", ${algorithm}, ${type}, "${value}"),\n|;
36 print SSHFP_JS qq|];\n|;