|
@@ -157,18 +157,24 @@ fi
|
157
|
157
|
gpg --output $FRAGMENTS_DIR/backup_pubkey.txt \
|
158
|
158
|
--armor --export $MY_BACKUP_KEY_ID
|
159
|
159
|
if [ ! "$?" = "0" ]; then
|
|
160
|
+ shred -zu $FRAGMENTS_DIR/privkey.txt
|
160
|
161
|
echo $"Unable to extract backup public key for $MY_BACKUP_KEY_ID"
|
161
|
162
|
exit 62928
|
162
|
163
|
fi
|
163
|
|
-echo '$BACKUP_DUMMY_PASSWORD' | \
|
|
164
|
+echo "$BACKUP_DUMMY_PASSWORD" | \
|
164
|
165
|
gpg --output $FRAGMENTS_DIR/backup_privkey.txt \
|
165
|
166
|
--batch --passphrase-fd 0 \
|
166
|
167
|
--armor --export-secret-key $MY_BACKUP_KEY_ID
|
167
|
168
|
if [ ! "$?" = "0" ]; then
|
|
169
|
+ shred -zu $FRAGMENTS_DIR/privkey.txt
|
168
|
170
|
echo $"Unable to extract backup private key for $MY_BACKUP_KEY_ID"
|
169
|
171
|
exit 13783
|
170
|
172
|
fi
|
171
|
173
|
|
|
174
|
+# Ensure there aren't any permissions problems when running cat
|
|
175
|
+chmod +r $FRAGMENTS_DIR/privkey.txt
|
|
176
|
+chmod +r $FRAGMENTS_DIR/backup_privkey.txt
|
|
177
|
+
|
172
|
178
|
cat $FRAGMENTS_DIR/pubkey.txt \
|
173
|
179
|
$FRAGMENTS_DIR/privkey.txt \
|
174
|
180
|
$FRAGMENTS_DIR/backup_pubkey.txt \
|