Support Ack button for firmware update.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 5 Dec 2018 06:36:16 +0000 (15:36 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 5 Dec 2018 06:36:16 +0000 (15:36 +0900)
ChangeLog
src/openpgp.c

index 069c17e..441e5f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-05  NIIBE Yutaka  <gniibe@fsij.org>
+
+       * src/openpgp.c (cmd_external_authenticate): Support
+       ACK button for firmware update.
+
 2018-12-04  NIIBE Yutaka  <gniibe@fsij.org>
 
        * src/openpgp-do.c (gpg_data_copy): Fix for NR_DO_UIF_SIG.
index 984e715..38cd76b 100644 (file)
@@ -1388,6 +1388,13 @@ cmd_external_authenticate (struct eventflag *ccid_comm)
       return;
     }
 
+#ifdef ACKBTN_SUPPORT
+  if (gpg_do_get_uif (GPG_KEY_FOR_SIGNING)
+      || gpg_do_get_uif (GPG_KEY_FOR_DECRYPTION)
+      || gpg_do_get_uif (GPG_KEY_FOR_AUTHENTICATION))
+    eventflag_signal (ccid_comm, EV_EXEC_ACK_REQUIRED);
+#endif
+
   r = rsa_verify (pubkey, FIRMWARE_UPDATE_KEY_CONTENT_LEN,
                  challenge, signature);
   random_bytes_free (challenge);