From 925e18ab4d5fb5df0f736234f7d766f8bb014dc1 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Wed, 5 Jul 2023 22:59:43 +0200 Subject: [PATCH] Remove APPIMAGETOOL_FORCE_SIGN env var --- src/appimagetool.c | 7 +------ src/appimagetool_sign.c | 4 ++-- src/appimagetool_sign.h | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/appimagetool.c b/src/appimagetool.c index 9c8a865..ec59649 100644 --- a/src/appimagetool.c +++ b/src/appimagetool.c @@ -1034,12 +1034,7 @@ main (int argc, char *argv[]) if (sign) { if (!sign_appimage(destination, sign_key, verbose)) { - if (getenv(FORCE_SIGN_ENV_VAR) != NULL) { - fprintf(stderr, "ERROR: signing failed, aborting\n"); - exit(1); - } else { - fprintf(stderr, "ERROR: signing failed, continuing\n"); - } + die("Signing failed, aborting"); } } diff --git a/src/appimagetool_sign.c b/src/appimagetool_sign.c index 83df593..0a3e1cd 100644 --- a/src/appimagetool_sign.c +++ b/src/appimagetool_sign.c @@ -358,9 +358,9 @@ bool sign_appimage(char* appimage_filename, char* key_id, bool verbose) { if (sscanf(engine_info->version, "%u.%u", &major, &minor) == 2) { if (major == 2) { if (minor == 0) { - fprintf(stderr, "[sign] warning: loopback pinentry mode not supported with gpg 2.0.x, %s may not work\n", FORCE_SIGN_ENV_VAR); + fprintf(stderr, "[sign] warning: loopback pinentry mode not supported with gpg 2.0.x, signing may fail silently\n"); } else if (minor == 1) { - fprintf(stderr, "[sign] warning: gpg 2.1.x detected, %s can only work with allow-loopback-entry set within the gpg-agent configuration\n", FORCE_SIGN_ENV_VAR); + fprintf(stderr, "[sign] warning: gpg 2.1.x detected, signing may fail silently unless allow-loopback-entry is set within the gpg-agent configuration\n"); } } else { fprintf(stderr, "[sign] error: unsupported engine version, aborting\n"); diff --git a/src/appimagetool_sign.h b/src/appimagetool_sign.h index df7605d..59e860b 100644 --- a/src/appimagetool_sign.h +++ b/src/appimagetool_sign.h @@ -1,7 +1,5 @@ #pragma once -static const char* const FORCE_SIGN_ENV_VAR = "APPIMAGETOOL_FORCE_SIGN"; - bool sign_appimage(char* appimage_filename, char* key_id, bool verbose); /**