From: Tom Hughes Date: Sat, 8 Feb 2020 16:02:02 +0000 (+0000) Subject: Limit the number of SSHFP records we generate X-Git-Url: https://git.openstreetmap.org/dns.git/commitdiff_plain/92c136c904be9197783db936f54082355730d300 Limit the number of SSHFP records we generate --- diff --git a/Makefile b/Makefile index 8a26dd0..7811651 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ data/switch2osm.org: src/switch2osm data/switch2osm.com: src/switch2osm data/stateofthemap.eu: src/stateofthemap-eu -include/sshfp.js: +include/sshfp.js: $(wildcard /etc/ssh/ssh_known_hosts) bin/mksshfp origins/tile.openstreetmap.yml: bin/mkcountries lib/countries.xml bandwidth/tile.openstreetmap.yml diff --git a/bin/mksshfp b/bin/mksshfp index e4bc8ed..7c0f518 100755 --- a/bin/mksshfp +++ b/bin/mksshfp @@ -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 {