~mdw
/
distorted-keys
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Multiple key types, key profiles, and user key storage.
[distorted-keys]
/
keys.stash
diff --git
a/stash
b/keys.stash
old mode 100644
(file)
new mode 100755
(executable)
similarity index 88%
rename from
stash
rename to
keys.stash
index
98116b5
..
59eeabf
--- a/
stash
+++ b/
keys.stash
@@
-35,24
+35,20
@@
The LABEL is used to identify the encrypted secret later to the \`recover'
command. The secret is read from SECRET, or stdin if SECRET is omitted or
\`-'.
HELP
command. The secret is read from SECRET, or stdin if SECRET is omitted or
\`-'.
HELP
-dohelp
## Parse the command line.
case $# in
2) if [ -t 0 ]; then echo >&2 "$quis: stdin is a terminal"; exit 1; fi ;;
3) ;;
## Parse the command line.
case $# in
2) if [ -t 0 ]; then echo >&2 "$quis: stdin is a terminal"; exit 1; fi ;;
3) ;;
- *)
echo >&2 "$usage"; exit 1
;;
+ *)
usage_err
;;
esac
recov=$1 label=$2; shift 2
checkword "recovery key label" "$recov"
checklabel "secret" "$label"
## Do the thing.
esac
recov=$1 label=$2; shift 2
checkword "recovery key label" "$recov"
checklabel "secret" "$label"
## Do the thing.
-
tmp=$(mktmp); cleanup rm
tmp
+
mk
tmp
cat -- "$@" >$tmp/secret
cat -- "$@" >$tmp/secret
-cd $KEYS/recov/$recov/current
-case $label in */*) mkdir -m755 -p ${label%/*} ;; esac
-ec_encrypt pub -i$tmp/secret -o$label.new
-mv $label.new $label.recov
+stash $recov $label <$tmp/secret
###----- That's all, folks --------------------------------------------------
###----- That's all, folks --------------------------------------------------