#!/bin/bash

## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

your_script_begin() {
   echo "$FUNCNAME: ..."
}

verification() {
   echo "$FUNCNAME: BEGIN"
   gpg_bash_lib_input_key_import_dir="/usr/share/gpg-bash-lib/misc/gpg-test-pub-key.d"
   gpg_bash_lib_input_file_name_enforce="true"
   gpg_bash_lib_input_cleanup="true"
   gpg_bash_lib_input_data_file="/usr/share/gpg-bash-lib/misc/test-files/test-file"
   gpg_bash_lib_input_sig_file="/usr/share/gpg-bash-lib/misc/test-files/test-file.asc"

   source "/usr/libexec/gpg-bash-lib/source_all"

   gpg_bash_lib_function_main_verify

   echo "$FUNCNAME: END"
}

your_script_output() {
   echo "$FUNCNAME: BEGIN"
   echo "\
gpg_bash_lib_output_failure_status: $gpg_bash_lib_output_failure_status
gpg_bash_lib_output_gpg_verify_exit_code: $gpg_bash_lib_output_gpg_verify_exit_code
gpg_bash_lib_output_validsig_status: $gpg_bash_lib_output_validsig_status
gpg_bash_lib_output_fingerprint_in_hex: $gpg_bash_lib_output_fingerprint_in_hex
gpg_bash_lib_output_signed_on_unixtime: $gpg_bash_lib_output_signed_on_unixtime
gpg_bash_lib_output_signed_on_date: $gpg_bash_lib_output_signed_on_date
gpg_bash_lib_output_notation[$"file@name"]: ${gpg_bash_lib_output_notation[$"file@name"]}
gpg_bash_lib_output_file_name_tampering: $gpg_bash_lib_output_file_name_tampering
gpg_bash_lib_output_freshness_status: $gpg_bash_lib_output_freshness_status
gpg_bash_lib_output_freshness_detail: $gpg_bash_lib_output_freshness_detail
gpg_bash_lib_output_freshness_msg:
$gpg_bash_lib_output_freshness_msg
gpg_bash_lib_output_alright_status: $gpg_bash_lib_output_alright_status"
   echo "$FUNCNAME: END"
}

your_script_begin
verification
your_script_output
