diff options
author | Timo Weingärtner <timo@tiwe.de> | 2012-02-25 21:17:00 +0100 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2012-02-25 21:17:00 +0100 |
commit | 4b444020fa50e4f22a427b981c582b35cdb4efb1 (patch) | |
tree | a7e31424e72b3a98053ca5b11206831cfd3322e2 /plugins | |
parent | 8f32f842b33bdc6617b41dc9f18b222fd3013e21 (diff) | |
download | openssh-known-hosts-4b444020fa50e4f22a427b981c582b35cdb4efb1.tar.gz |
Imported Debian version 0.2debian/0.2
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/curl | 11 | ||||
-rwxr-xr-x | plugins/rsync | 10 |
2 files changed, 19 insertions, 2 deletions
diff --git a/plugins/curl b/plugins/curl index 8e658cc..5964613 100755 --- a/plugins/curl +++ b/plugins/curl @@ -4,10 +4,19 @@ # # ENVIRONMENT VARIABLES: # URL URL to download known_hosts file from +# SIGURL URL of the GnuPG signature +# KEYRING path to the keyring for use by gpgv # set -e -curl -Rz "./current" -m 300 -o new "${URL}" +if [ "${SIGURL}" ]; then + curl -Rz "./current" -m 300 -o new.sig "${SIGURL}" -o new "${URL}" + [ -e new ] || exit 0 + gpgv --keyring "${KEYRING}" --status-fd 2 new.sig || exit 1 + # return 1 because it's not clear what other codes may used +else + curl -Rz "./current" -m 300 -o new "${URL}" +fi # vim:set ft=sh: diff --git a/plugins/rsync b/plugins/rsync index 17a1e54..2d51a9d 100755 --- a/plugins/rsync +++ b/plugins/rsync @@ -3,7 +3,9 @@ # rsync plugin # # ENVIRONMENT VARIABLES: -# URL URL to download known_hosts file from +# URL URL to download known_hosts file from +# SIGURL URL of the GnuPG signature +# KEYRING path to the keyring for use by gpgv # set -e @@ -11,4 +13,10 @@ set -e ln -f current new || true rsync -vt --timeout=300 "${URL}" new +if [ "${SIGURL}" ]; then + rsync -vt --timeout=300 "${SIGURL}" new.sig + gpgv --keyring "${KEYRING}" --status-fd 2 new.sig || exit 1 + # return 1 because it's not clear what other codes may used +fi + # vim:set ft=sh: |