aboutsummaryrefslogtreecommitdiff
path: root/lsign
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-09-18 16:37:46 -0300
committerSilvio Rhatto <user@example.org>2014-09-18 16:37:46 -0300
commit7c4fe2e92918a3f05bd8dfcbafc0e3942cfca558 (patch)
treec3fb1f1938c102a75b356a25f4b32a12ee2ce88f /lsign
downloadutils-gpg-7c4fe2e92918a3f05bd8dfcbafc0e3942cfca558.tar.gz
utils-gpg-7c4fe2e92918a3f05bd8dfcbafc0e3942cfca558.tar.bz2
Initial import
Diffstat (limited to 'lsign')
-rwxr-xr-xlsign25
1 files changed, 25 insertions, 0 deletions
diff --git a/lsign b/lsign
new file mode 100755
index 0000000..e1ceb3d
--- /dev/null
+++ b/lsign
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Locally sign an OpenPGP key.
+#
+
+# Parameters
+BASENAME="`basename $0`"
+NAME="$1"
+set -e
+
+# Syntax check
+if [ -z "$NAME" ]; then
+ echo "usage: $BASENAME <key>"
+ exit 1
+fi
+
+# Optional reason
+read -e -p 'Optional lsignreason notation: ' REASON
+
+# Local signature
+if [ ! -z "$REASON" ]; then
+ gpg --lsign --ask-cert-expire "$NAME"
+else
+ gpg --lsign --cert-notation "lsigreason@notations.openpgp.fifthhorseman.net=${REASON}" --ask-cert-expire "$NAME"
+fi