From 80e2e1c7c9f2cc2795f497f2101b0aeb7b7e8638 Mon Sep 17 00:00:00 2001 From: Jonas Witschel Date: Wed, 2 Oct 2019 16:40:54 +0200 Subject: signing: move key import confirmation before key_search Ask the user whether they want to import a missing key before even doing a search on the keyserver. This will be useful for getting Web Key Directory support in place: for a WKD, looking up and importing a key are a single action, so the current key_search -> QUESTION -> key_import workflow does not apply. Since only the ID of the package signing key is available before key_search, we display the packager variable in addition to the key ID for user convenience. Signed-off-by: Jonas Witschel Signed-off-by: Allan McRae --- src/pacman/callback.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/pacman/callback.c') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index fc4ce875..25528100 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -456,17 +456,8 @@ void cb_question(alpm_question_t *question) case ALPM_QUESTION_IMPORT_KEY: { alpm_question_import_key_t *q = &question->import_key; - char created[12]; - time_t time = (time_t)q->key->created; - strftime(created, 12, "%Y-%m-%d", localtime(&time)); - - if(q->key->revoked) { - q->import = yesno(_("Import PGP key %u%c/%s, \"%s\", created: %s (revoked)?"), - q->key->length, q->key->pubkey_algo, q->key->fingerprint, q->key->uid, created); - } else { - q->import = yesno(_("Import PGP key %u%c/%s, \"%s\", created: %s?"), - q->key->length, q->key->pubkey_algo, q->key->fingerprint, q->key->uid, created); - } + q->import = yesno(_("Import PGP key %s, \"%s\"?"), + q->key->fingerprint, q->key->uid); } break; } -- cgit v1.2.3-54-g00ecf