From 8990025c26b476453e2ed654c829c83fd0416727 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 1 Jun 2017 20:27:16 +0100 Subject: [PATCH] Display gpg fingerprint on control panel --- src/freedombone-controlpanel-user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-controlpanel-user b/src/freedombone-controlpanel-user index 8896d97a..61a1e78f 100755 --- a/src/freedombone-controlpanel-user +++ b/src/freedombone-controlpanel-user @@ -398,8 +398,8 @@ function block_unblock_subject { } function show_gpg_key { - GPG_FINGERPRINT=$(gpg --fingerprint $MY_EMAIL_ADDRESS | grep -i "key fingerprint" | head -n 1 | awk -F '= ' '{print $2}') - GPG_DATE=$(gpg --fingerprint $MY_EMAIL_ADDRESS | grep -i "pub" | head -n 1 | awk -F '/' '{print $2}' | awk -F ' ' '{print $2}') + GPG_FINGERPRINT=$(gpg --fingerprint $MY_EMAIL_ADDRESS | sed -n '2p' | sed 's/^[ \t]*//') + GPG_DATE=$(gpg --fingerprint $MY_EMAIL_ADDRESS | grep -i "pub" | head -n 1 | awk -F ' ' '{print $3}') dialog --title $"My PGP/GPG Key" \ --backtitle $"Freedombone User Control Panel" \ --msgbox $"Email Address: $MY_EMAIL_ADDRESS\n\nKey ID: $GPG_ID\n\nFingerprint: $GPG_FINGERPRINT\n\nCreated: $GPG_DATE" 12 70