Skip to content

Commit a6caef6

Browse files
committed
Log when APPIMAGETOOL_SIGN_PASSPHRASE is set
There appear to be cases in which a passphrase is set (and appimagetool correctly changes the pinentry mode to loopback) in which the gpg-agent never asks for a password. In such a scenario, the logging within our passphrase callback is never used, making it impossible to tell where the problem is exactly. With this change, the log will show whether or not the passphrase env var was found.
1 parent 68cdb36 commit a6caef6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/appimagetool_sign.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ bool sign_appimage(char* appimage_filename, char* key_id, bool verbose) {
355355

356356
// in case the user provides a passphrase in the environment, we have to set the pinentry mode to loopback, like with the CLI
357357
if (get_passphrase_from_environment() != NULL) {
358+
fprintf(stderr, "[sign] passphrase available from environment, setting pinentry mode to loopback\n");
358359
gpgme_set_pinentry_mode(gpgme_ctx, GPGME_PINENTRY_MODE_LOOPBACK);
359360
gpgme_set_passphrase_cb(gpgme_ctx, gpgme_passphrase_callback, (void*) gpgme_hook);
360361
}

0 commit comments

Comments
 (0)