diff options
author | EuAndreh <eu@euandre.org> | 2019-06-01 23:03:04 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-01 23:03:04 -0300 |
commit | 52b0b58786b6227bc23635762df82d91e9fd0c27 (patch) | |
tree | 77f3d20a3bf824eec4da22eac62518479cb8ea6a /scripts | |
parent | Add helper scripts/export-keys.sh (diff) | |
download | dotfiles-52b0b58786b6227bc23635762df82d91e9fd0c27.tar.gz dotfiles-52b0b58786b6227bc23635762df82d91e9fd0c27.tar.xz |
Export ownertrust in export-keys.sh
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/export-keys.sh | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/scripts/export-keys.sh b/scripts/export-keys.sh index b7ef50d..5807dbc 100755 --- a/scripts/export-keys.sh +++ b/scripts/export-keys.sh @@ -2,22 +2,34 @@ set -Eeuo pipefail yellow "Exporting public key..." -gpg --export --armor -a EuAndreh > keys +gpg --export --armor -a EuAndreh > keys.gpg green "Done." yellow "Exporting private key..." read -p "A prompt for the GPG password will appear! (Press any key to continue)" -n 1 -r -gpg --export-secret-keys --armor -a EuAndreh >> keys +gpg --export-secret-keys --armor -a EuAndreh >> keys.gpg green "Done." -yellow "Encrypting key pair..." +yellow "Exporting ownertrust..." +gpg --export-ownertrust > trust.txt +green "Done." + +yellow "Creating tar with key pair and trust content..." +tar -cvf EuAndreh.tar keys.gpg trust.txt +green "Done." + +yellow "Encrypting tar file..." read -p "A prompt for the symmetric encryption key of the keys.gpg file will appear! (Press any key to continue)" -n 1 -r -gpg --cipher-algo AES256 -c keys +gpg --cipher-algo AES256 -c EuAndreh.tar green "Done." yellow "Removing traces of private key..." -shred keys -rm keys +shred trust.txt +rm trust.txt +shred keys.gpg +rm keys.gpg +shred EuAndreh.tar +rm EuAndreh.tar green "Done." -blue "File 'keys.gpg' create!" +blue "File 'EuAndreh.tar.gpg' created!" |