aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-zblock-pack
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak-zblock-pack')
-rwxr-xr-xbin/ak-zblock-pack7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ak-zblock-pack b/bin/ak-zblock-pack
index 2a7c072..4f635bf 100755
--- a/bin/ak-zblock-pack
+++ b/bin/ak-zblock-pack
@@ -19,6 +19,7 @@ set -xe
# Logging patch
source $AK_LIBDIR/_ak_logit
+source $AK_LIBDIR/_ak_gpg
# Below, the usage information
usage(){
@@ -57,14 +58,14 @@ main(){
# We create a detached and armor signature of it
MESSAGE_SIGN_FILE=$MESSAGE".asc"
- gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $MESSAGE_SIGN_FILE $MESSAGE
+ _ak_gpg_sign_detached $MESSAGE_SIGN_FILE $MESSAGE
# We add the signature to IPFS
MESSAGE_SIGNATURE=$(ak-ipfs-add $MESSAGE_SIGN_FILE)
# We will be using our public key also to put it in the block later
KEY="gpg.pub"
- gpg2 --homedir $AK_GPGHOME --armour --output $KEY --export $AK_FINGERPRINT
+ _ak_gpg_key_self_export $KEY
GPG_PUB_KEY=$(ak-ipfs-add $KEY)
# Acquire last block of information, to chain this one with previous posted
@@ -75,7 +76,7 @@ main(){
BLOCK="block"
BLOCK_SIG=$BLOCK".asc"
# We have a block now, so we sign it
- gpg2 --homedir $AK_GPGHOME --detach-sign --sign-with $AK_FINGERPRINT --armor --output $BLOCK_SIG $BLOCK
+ _ak_gpg_sign_detached $BLOCK_SIG $BLOCK
# We now add the signature to IPFS
BLOCK_SIGNATURE=$(ak-ipfs-add $BLOCK_SIG)