mirror of
https://github.com/drduh/YubiKey-Guide.git
synced 2025-05-18 11:07:10 +02:00
save mats functions
This commit is contained in:
parent
1ab20d5fea
commit
cbd39ffbb0
1 changed files with 27 additions and 12 deletions
|
@ -65,23 +65,38 @@ gen_key_subs () {
|
||||||
|
|
||||||
gen_key_subs
|
gen_key_subs
|
||||||
|
|
||||||
gpg -K
|
list_keys () {
|
||||||
|
# Prints available secret keys.
|
||||||
|
gpg --list-secret-keys
|
||||||
|
}
|
||||||
|
|
||||||
echo "$CERTIFY_PASS" | \
|
save_secrets () {
|
||||||
|
# Exports secret keys to local files.
|
||||||
|
echo "$CERTIFY_PASS" | \
|
||||||
gpg --output $GNUPGHOME/$KEYID-Certify.key \
|
gpg --output $GNUPGHOME/$KEYID-Certify.key \
|
||||||
--batch --pinentry-mode=loopback --passphrase-fd 0 \
|
--batch --pinentry-mode=loopback --passphrase-fd 0 \
|
||||||
--armor --export-secret-keys $KEYID
|
--armor --export-secret-keys $KEYID
|
||||||
|
|
||||||
echo "$CERTIFY_PASS" | \
|
echo "$CERTIFY_PASS" | \
|
||||||
gpg --output $GNUPGHOME/$KEYID-Subkeys.key \
|
gpg --output $GNUPGHOME/$KEYID-Subkeys.key \
|
||||||
--batch --pinentry-mode=loopback --passphrase-fd 0 \
|
--batch --pinentry-mode=loopback --passphrase-fd 0 \
|
||||||
--armor --export-secret-subkeys $KEYID
|
--armor --export-secret-subkeys $KEYID
|
||||||
|
}
|
||||||
|
|
||||||
gpg --output $GNUPGHOME/$KEYID-$(date +%F).asc \
|
save_pubkey () {
|
||||||
|
# Exports public key to local file.
|
||||||
|
gpg --output $GNUPGHOME/$KEYID-$(date +%F).asc \
|
||||||
--armor --export $KEYID
|
--armor --export $KEYID
|
||||||
|
}
|
||||||
|
|
||||||
export LUKS_PASS="$(get_pass)"
|
list_keys
|
||||||
|
|
||||||
|
save_secrets
|
||||||
|
|
||||||
|
save_pubkey
|
||||||
|
|
||||||
printf "CERTIFY PASS: \n$CERTIFY_PASS\n\n"
|
printf "CERTIFY PASS: \n$CERTIFY_PASS\n\n"
|
||||||
|
|
||||||
|
export LUKS_PASS="$(get_pass)"
|
||||||
|
|
||||||
printf "LUKS PASS:\n$LUKS_PASS\n\n"
|
printf "LUKS PASS:\n$LUKS_PASS\n\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue