commit:     d49e67fc4060ef6fe96ffcf5928534d00886d539
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 12 12:18:42 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Oct 16 04:54:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d49e67fc

verify-sig.eclass: Error out on invalid method+function combos

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/verify-sig.eclass | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass
index d601c7838a00..9886e3352db7 100644
--- a/eclass/verify-sig.eclass
+++ b/eclass/verify-sig.eclass
@@ -173,6 +173,9 @@ verify-sig_verify_detached() {
                                -V -p "${key}" -m "${file}" -x "${sig}" ||
                                die "Signify signature verification failed"
                        ;;
+               *)
+                       die "${FUNCNAME} not supported with 
${VERIFY_SIG_METHOD}"
+                       ;;
        esac
 }
 
@@ -234,6 +237,9 @@ verify-sig_verify_message() {
                        signify -V -e -p "${key}" -m "${output_file}" -x 
"${file}" ||
                                die "Signify signature verification failed"
                        ;;
+               *)
+                       die "${FUNCNAME} not supported with 
${VERIFY_SIG_METHOD}"
+                       ;;
        esac
 }
 
@@ -367,6 +373,9 @@ verify-sig_verify_signed_checksums() {
                                -x "${checksum_file}" "${files[@]}" ||
                                die "Signify signature verification failed"
                        ;;
+               *)
+                       die "${FUNCNAME} not supported with 
${VERIFY_SIG_METHOD}"
+                       ;;
        esac
 }
 

Reply via email to