Package: keyringer
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, bash, git-core, gnupg, grep, gawk, coreutils, sed
-Recommends: openssl
+Recommends: openssl, xdg-utils
Description: Distributed secret management using GPG and git
Keyringer lets you manage and share secrets using GPG and git in a distributed
fashion. It has custom commands to encrypt, decrypt, recrypt, create key pairs,
# Decrypt the information to the file
$GPG --yes -o "$TMPWORK" --use-agent -d "$KEYDIR/$FILE"
+if [ "$BASENAME" == "edit" ]; then
+ APP="$EDITOR"
+elif [ "$BASENAME" == "open" ]; then
+ if which xdg-open &> /dev/null; then
+ APP="xdg-open"
+ else
+ echo "You should have xdg-open application to perform this action, aborting."
+ exit 1
+ fi
+fi
+
# Prompt
-echo "Press any key to open the decrypted data in $EDITOR, Ctrl-C to abort"
+echo "Press any key to open the decrypted data with $APP, Ctrl-C to abort"
read key
-$EDITOR "$TMPWORK"
+$APP "$TMPWORK"
# Encrypt again
$GPG --yes -o "$KEYDIR/$FILE" --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS_FILE") "$TMPWORK"
--- /dev/null
+edit
\ No newline at end of file
genpair <*ssh*|*gpg*|*ssl*|*ssl-self*> [*options*]
: Wrapper to generete encryption keypairs, useful for automated key deployment.
+open <*SECRET*>
+: Open a secret using xdg-open.
+
recrypt <*SECRET*>
: Recrypts a secret by decrypting it and recrypting again. Useful when users are added
into recipient configuration. If no *SECRET* is given, all secrets in the repository