diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-02-04 23:05:08 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-02-04 23:05:08 -0200 |
commit | 677a29ae4e3f9111fee7a358a969e4a022895b21 (patch) | |
tree | 1eff400c8fffa860d8f5ef4492852c25e4fd9da0 | |
parent | bd2421668b884f23f5fb43195b8a86296e9fe1bd (diff) | |
download | scripts-677a29ae4e3f9111fee7a358a969e4a022895b21.tar.gz scripts-677a29ae4e3f9111fee7a358a969e4a022895b21.tar.bz2 |
Adding lsign script
-rwxr-xr-x | lsign | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -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 |