Skip to content
Snippets Groups Projects
Commit e8c8a32a authored by intrigeri's avatar intrigeri
Browse files

dup: now possible to use different keys to sign and encrypt

parent 0a60cd6e
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,8 @@ version 0.9.2 -- unreleased ...@@ -20,6 +20,8 @@ version 0.9.2 -- unreleased
a nice menu to choose the Vservers to backup (thanks to a nice menu to choose the Vservers to backup (thanks to
lib/vserver) lib/vserver)
added man/ninjahelper.1 man page added man/ninjahelper.1 man page
duplicity handler: now possible to use different keys to encrypt and
sign
version 0.9.1 -- November 05 2005 version 0.9.1 -- November 05 2005
rearranged source so that it is relocatable with autotools rearranged source so that it is relocatable with autotools
......
...@@ -19,13 +19,17 @@ nicelevel = 19 ...@@ -19,13 +19,17 @@ nicelevel = 19
password = a_very_complicated_passphrase password = a_very_complicated_passphrase
# default is no, for backward compatibility with backupninja <= 0.5. # default is no, for backward compatibility with backupninja <= 0.5.
# when set to yes, encryptkey option must be set below. # when set to yes, either signkey or encryptkey option must be set below.
sign = yes sign = yes
# key ID used for data encryption and, optionnally, signing. # key ID used for data encryption.
# if not set, local root's default gpg key is used. # if not set, local root's default GnuPG key is used.
encryptkey = 04D9EA79 encryptkey = 04D9EA79
# key ID used for data signing.
# if not set, encryptkey will be used.
#signkey = 04D9EA79
###################################################### ######################################################
## source section ## source section
## (where the files to be backed up are coming from) ## (where the files to be backed up are coming from)
......
...@@ -11,6 +11,7 @@ setsection gpg ...@@ -11,6 +11,7 @@ setsection gpg
getconf password getconf password
getconf sign no getconf sign no
getconf encryptkey getconf encryptkey
getconf signkey
setsection source setsection source
getconf include getconf include
...@@ -79,11 +80,17 @@ scpoptions="$sshoptions" ...@@ -79,11 +80,17 @@ scpoptions="$sshoptions"
execstr="$options --no-print-statistics --scp-command 'scp $scpoptions' --ssh-command 'ssh $sshoptions' " execstr="$options --no-print-statistics --scp-command 'scp $scpoptions' --ssh-command 'ssh $sshoptions' "
if [ "$encryptkey" == "" ]; then # if encryptkey is set, add --encrypt-key to the command-line
[ "$sign" != "yes" ] || fatal "encryptkey option must be set when signing." [ -z "$encryptkey" ] || execstr="${execstr}--encrypt-key $encryptkey "
else # if signkey is not set, set it to encryptkey
execstr="${execstr}--encrypt-key $encryptkey " [ -n "$signkey" ] || signkey="$encryptkey"
[ "$sign" != "yes" ] || execstr="${execstr}--sign-key $encryptkey " # if needed, add --sign-key to command-line
if [ "$sign" == "yes" ]; then
if [ -n "$signkey" ]; then
execstr="${execstr}--sign-key $signkey "
else
fatal "Either encryptkey or signkey option must be set when signing."
fi
fi fi
if [ "$keep" != "yes" ]; then if [ "$keep" != "yes" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment