aboutsummaryrefslogtreecommitdiffstats
path: root/dns/sshfp/files
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2016-01-21 17:08:28 +0800
committerehaupt <ehaupt@FreeBSD.org>2016-01-21 17:08:28 +0800
commitea95bfc3e7f7a4c2b4a6d1129bc1be764198d988 (patch)
tree53e111dd1923a6ae6b1f11aae781d87c6ea0811d /dns/sshfp/files
parent1bdaf37ac6abc783e736e64a20f90e207ca49184 (diff)
downloadfreebsd-ports-gnome-ea95bfc3e7f7a4c2b4a6d1129bc1be764198d988.tar.gz
freebsd-ports-gnome-ea95bfc3e7f7a4c2b4a6d1129bc1be764198d988.tar.zst
freebsd-ports-gnome-ea95bfc3e7f7a4c2b4a6d1129bc1be764198d988.zip
- Fix with python2.7
- Use shebangfix macro instead of manual shebang patching
Diffstat (limited to 'dns/sshfp/files')
-rw-r--r--dns/sshfp/files/patch-sshfp29
1 files changed, 29 insertions, 0 deletions
diff --git a/dns/sshfp/files/patch-sshfp b/dns/sshfp/files/patch-sshfp
new file mode 100644
index 000000000000..e3d1ec8f510e
--- /dev/null
+++ b/dns/sshfp/files/patch-sshfp
@@ -0,0 +1,29 @@
+--- sshfp.orig 2016-01-21 09:01:28 UTC
++++ sshfp
+@@ -129,7 +129,7 @@ def sshfp_from_file(khfile, wantedHosts)
+ fingerprints.append(process_records(data, wantedHosts))
+ return "\n".join(fingerprints)
+
+-def check_keytype(keytype):
++def check_keytype(keytype, hostname):
+ global algos
+ for algo in algos:
+ if "ssh-%s" % algo[:-1] == keytype[:-1]:
+@@ -141,7 +141,7 @@ def check_keytype(keytype):
+ def process_record(record, hostname):
+ (host, keytype, key) = record.split(" ")
+ key = key.rstrip()
+- if check_keytype(keytype):
++ if check_keytype(keytype, hostname):
+ record = create_sshfp(hostname, keytype, key)
+ return record
+ return ""
+@@ -168,7 +168,7 @@ def process_records(data, hostnames):
+ if "," in host:
+ host = host.split(",")[0]
+ if all_hosts or host in hostnames or host == hostnames:
+- if not check_keytype(keytype):
++ if not check_keytype(keytype, host):
+ continue
+ all_records.append(create_sshfp(host, keytype, key))
+ if all_records: