aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-zblock-pack
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-03-27 03:49:27 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-03-27 03:49:27 +0200
commit28717aded7df4ac4842fa308e67c1c15e1de4ffa (patch)
tree64a93db7a952dabf5c2af3b7776bdcf0d050e181 /bin/ak-zblock-pack
parentabdfe0a5c2a86f19aafe12ae70663ddcf83a6e39 (diff)
downloadarching-kaos-tools-28717aded7df4ac4842fa308e67c1c15e1de4ffa.tar.gz
arching-kaos-tools-28717aded7df4ac4842fa308e67c1c15e1de4ffa.tar.bz2
arching-kaos-tools-28717aded7df4ac4842fa308e67c1c15e1de4ffa.zip
Introduced and applied _ak_gpg library
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)