|
|
|
@ -64,7 +64,7 @@ fi
|
|
|
|
# /VALIDATE INPUTS
|
|
|
|
# /VALIDATE INPUTS
|
|
|
|
# /OPTIONS: ARGPARSING and VALIDATION
|
|
|
|
# /OPTIONS: ARGPARSING and VALIDATION
|
|
|
|
|
|
|
|
|
|
|
|
function fn_extract_fpr(){
|
|
|
|
function fn_gpg_extract_fpr(){
|
|
|
|
gpgkeyfile=$1;shift;
|
|
|
|
gpgkeyfile=$1;shift;
|
|
|
|
# fingerprint
|
|
|
|
# fingerprint
|
|
|
|
# caveat: restrict to netgo.de email, use-case:
|
|
|
|
# caveat: restrict to netgo.de email, use-case:
|
|
|
|
@ -75,7 +75,7 @@ function fn_extract_fpr(){
|
|
|
|
echo "${fpr}"
|
|
|
|
echo "${fpr}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function fn_extract_uid(){
|
|
|
|
function fn_gpg_extract_uid(){
|
|
|
|
gpgkeyfile=$1;shift;
|
|
|
|
gpgkeyfile=$1;shift;
|
|
|
|
# user id
|
|
|
|
# user id
|
|
|
|
# caveat: restrict to netgo.de email, use-case:
|
|
|
|
# caveat: restrict to netgo.de email, use-case:
|
|
|
|
@ -96,13 +96,13 @@ function fn_generate_sops_config(){
|
|
|
|
type_list=()
|
|
|
|
type_list=()
|
|
|
|
for gpgkeyfile in *automation*gpg.pub; do
|
|
|
|
for gpgkeyfile in *automation*gpg.pub; do
|
|
|
|
type_list+=( "autom" )
|
|
|
|
type_list+=( "autom" )
|
|
|
|
fpr_list+=( "$(fn_extract_fpr "${gpgkeyfile}")" )
|
|
|
|
fpr_list+=( "$(fn_gpg_extract_fpr "${gpgkeyfile}")" )
|
|
|
|
uid_list+=( "$(fn_extract_uid "${gpgkeyfile}")" )
|
|
|
|
uid_list+=( "$(fn_gpg_extract_uid "${gpgkeyfile}")" )
|
|
|
|
done
|
|
|
|
done
|
|
|
|
for gpgkeyfile in $(ls *gpg.pub | grep -v automation); do
|
|
|
|
for gpgkeyfile in $(ls *gpg.pub | grep -v automation); do
|
|
|
|
type_list+=( "human" )
|
|
|
|
type_list+=( "human" )
|
|
|
|
fpr_list+=( "$(fn_extract_fpr "${gpgkeyfile}")" )
|
|
|
|
fpr_list+=( "$(fn_gpg_extract_fpr "${gpgkeyfile}")" )
|
|
|
|
uid_list+=( "$(fn_extract_uid "${gpgkeyfile}")" )
|
|
|
|
uid_list+=( "$(fn_gpg_extract_uid "${gpgkeyfile}")" )
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|