diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-17 18:58:22 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-17 18:58:22 (EDT) |
commit | a8c905edcc040e1a86d44db174c0f01236fc9dff (patch) | |
tree | f5881ec775c5ecddf6df695fd7611e1b7f6b260e /opkg-key | |
parent | 4e404e61aca3c316c023aa298862da06bc266bf2 (diff) |
opkg-key: Remove
Diffstat (limited to 'opkg-key')
-rw-r--r-- | opkg-key | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/opkg-key b/opkg-key deleted file mode 100644 index ae5e8a4..0000000 --- a/opkg-key +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -usage() { - cat <<EOF -Usage: $0 <command> <arguments...> -Commands: - add <file>: Add keyfile <file> to opkg trusted keys - remove <file>: Remove keyfile matching <file> from opkg trusted keys - verify <sigfile> <list>: Check list file <list> against signature file <sigfile> - -EOF - exit 1 -} - -opkg_key_verify() { - local sigfile="$1" - local msgfile="$2" - - ( - zcat "$msgfile" 2>/dev/null || - cat "$msgfile" 2>/dev/null - ) | usign -V -P /etc/opkg/keys -q -x "$sigfile" -m - -} - -opkg_key_add() { - local key="$1" - [ -n "$key" ] || usage - [ -f "$key" ] || echo "Cannot open file $1" - local fingerprint="$(usign -F -p "$key")" - mkdir -p "/etc/opkg/keys" - cp "$key" "/etc/opkg/keys/$fingerprint" -} - -opkg_key_remove() { - local key="$1" - [ -n "$key" ] || usage - [ -f "$key" ] || echo "Cannot open file $1" - local fingerprint="$(usign -F -p "$key")" - rm -f "/etc/opkg/keys/$fingerprint" -} - -case "$1" in - add) - shift - opkg_key_add "$@" - ;; - remove) - shift - opkg_key_remove "$@" - ;; - verify) - shift - opkg_key_verify "$@" - ;; - *) usage ;; -esac |