From andrius at stikonas.eu Mon Sep 17 21:51:43 2018 From: andrius at stikonas.eu (Andrius =?utf-8?B?xaB0aWtvbmFz?=) Date: Mon, 17 Sep 2018 20:51:43 +0100 Subject: Gnuk upgrade Message-ID: <23650482.qWgXiaynXq@laptop> Hi, I was trying to upgrade firmware of my gnuk token. One of the steps in the upgrade guide is registering a public rsa2048 key with the token. However, when I run that command, I get the following error $ ./gnuk_put_binary_libusb.py -k 0 1A092810.bin Device: Configuration: 1 Interface: 0 Traceback (most recent call last): File "./gnuk_put_binary_libusb.py", line 111, in main(fileid, is_update, data, passwd) File "./gnuk_put_binary_libusb.py", line 54, in main gnuk.cmd_write_binary(fileid, data, is_update) File "/home/andrius/repositories/gnuk/tool/gnuk_token.py", line 294, in cmd_write_binary raise ValueError("cmd_write_binary 1", "%02x%02x" % (sw[0], sw[1])) ValueError: ('cmd_write_binary 1', '6581') Does anybody know what I am doing wrong? Neither scdaemon nor pcscd is running. Kind regards, Andrius From andrius at stikonas.eu Mon Sep 17 21:53:57 2018 From: andrius at stikonas.eu (Andrius =?utf-8?B?xaB0aWtvbmFz?=) Date: Mon, 17 Sep 2018 20:53:57 +0100 Subject: Gnuk upgrade Message-ID: <2821614.UvFaA66Q3p@laptop> Hi, I was trying to upgrade firmware of my gnuk token. One of the steps in the upgrade guide is registering a public rsa2048 key with the token. However, when I run that command, I get the following error $ ./gnuk_put_binary_libusb.py -k 0 1A092810.bin Device: Configuration: 1 Interface: 0 Traceback (most recent call last): File "./gnuk_put_binary_libusb.py", line 111, in main(fileid, is_update, data, passwd) File "./gnuk_put_binary_libusb.py", line 54, in main gnuk.cmd_write_binary(fileid, data, is_update) File "/home/andrius/repositories/gnuk/tool/gnuk_token.py", line 294, in cmd_write_binary raise ValueError("cmd_write_binary 1", "%02x%02x" % (sw[0], sw[1])) ValueError: ('cmd_write_binary 1', '6581') Does anybody know what I am doing wrong? Neither scdaemon nor pcscd is running. Kind regards, Andrius From szczepan at nitrokey.com Tue Sep 18 10:13:42 2018 From: szczepan at nitrokey.com (Szczepan Zalega | Nitrokey) Date: Tue, 18 Sep 2018 10:13:42 +0200 Subject: Gnuk upgrade In-Reply-To: <23650482.qWgXiaynXq@laptop> References: <23650482.qWgXiaynXq@laptop> Message-ID: <5958382a-fc6e-75de-e92b-74d348c85617@nitrokey.com> On 09/17/2018 09:51 PM, Andrius ?tikonas via Gnuk-users wrote: > I was trying to upgrade firmware of my gnuk token. One of the steps in > the upgrade guide is registering a public rsa2048 key with the token. > > However, when I run that command, I get the following error > > Does anybody know what I am doing wrong? Neither scdaemon nor pcscd is running. Hi! Log indicates update script has connected, but device returned error 6581. What GNUK version are you using currently? Have you tried `upgrade_by_passwd.py` [1], as in: ./upgrade_by_passwd.py regnual.bin gnuk.bin [1] Nitrokey Start upgrade help page, which is based on GNUK: https://github.com/Nitrokey/nitrokey-start-firmware/tree/gnuk1.2-regnual-fix/prebuilt#upgrading-the-device -- Best regards, Szczepan From andrius at stikonas.eu Tue Sep 18 12:10:17 2018 From: andrius at stikonas.eu (Andrius =?utf-8?B?xaB0aWtvbmFz?=) Date: Tue, 18 Sep 2018 11:10:17 +0100 Subject: Gnuk upgrade In-Reply-To: <5958382a-fc6e-75de-e92b-74d348c85617@nitrokey.com> References: <23650482.qWgXiaynXq@laptop> <5958382a-fc6e-75de-e92b-74d348c85617@nitrokey.com> Message-ID: <1592457.QghCg7EaO4@laptop> Hi, I am currently using the latest git version (1.2.10). Initially device had neug and neug->gnuk flashed just fine. I wanted to recompile it with factory reset support. Other than that device works fine for me. I tried upgrade_by_passwd too but it didn't work. This was actually the first thing I tried... Well, my gnuk firmware wasn't factory firmware. And sorry for the duplicate first email. Andrius 2018 m. rugs?jo 18 d., antradienis 09:13:42 BST Szczepan Zalega | Nitrokey ra??: > On 09/17/2018 09:51 PM, Andrius ?tikonas via Gnuk-users wrote: > > I was trying to upgrade firmware of my gnuk token. One of the steps in > > the upgrade guide is registering a public rsa2048 key with the token. > > > > However, when I run that command, I get the following error > > > > Does anybody know what I am doing wrong? Neither scdaemon nor pcscd is running. > > Hi! > > Log indicates update script has connected, but device returned error > 6581. What GNUK version are you using currently? > > Have you tried `upgrade_by_passwd.py` [1], as in: > > ./upgrade_by_passwd.py regnual.bin gnuk.bin > > > [1] Nitrokey Start upgrade help page, which is based on GNUK: > https://github.com/Nitrokey/nitrokey-start-firmware/tree/gnuk1.2-regnual-fix/prebuilt#upgrading-the-device > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: This is a digitally signed message part. URL: From gniibe at fsij.org Wed Sep 19 01:44:16 2018 From: gniibe at fsij.org (NIIBE Yutaka) Date: Wed, 19 Sep 2018 08:44:16 +0900 Subject: Gnuk upgrade In-Reply-To: <1592457.QghCg7EaO4@laptop> References: <23650482.qWgXiaynXq@laptop> <5958382a-fc6e-75de-e92b-74d348c85617@nitrokey.com> <1592457.QghCg7EaO4@laptop> Message-ID: <871s9qe5gv.fsf@iwagami.gniibe.org> Andrius ?tikonas via Gnuk-users wrote: > I tried upgrade_by_passwd too but it didn't work. This was actually > the first thing I tried... Well, my gnuk firmware wasn't factory > firmware. My theory is like this: (1) Your first try by upgrade_by_passwd.py failed by some other reason. (2) Your second try by gnuk_put_binary_libusb.py failed because you repeat writing to the slot 0. The slot 0 for public key was written by the process of (1) already. In this situation, writing to the slot again results GPG_MEMORY_FAILURE (the error code of 0x6581), because the place can be only written once. Please do not use lower level tool like gnuk_put_binary_libusb.py, unless you don't know the detail. Please use upgrade_by_passwd.py instead. I suggest to identify the original issue, if you have a record of your trial. If not, please try upgrade_by_passwd.py with the option '-k' to specify another slot 1, you must record all the session, this time. Then, please examine your problem in the record and fix your issue(s) at first. After you will fix your issue, you can try upgrade_by_passwd.py with the option '-k' specifying slot 2, again. Please note that there are only four slots (0, 1, 2, and 3) available and all are write-once. You can only fail one more time. -- From andrius at stikonas.eu Wed Sep 19 10:52:16 2018 From: andrius at stikonas.eu (Andrius =?utf-8?B?xaB0aWtvbmFz?=) Date: Wed, 19 Sep 2018 09:52:16 +0100 Subject: Gnuk upgrade In-Reply-To: <871s9qe5gv.fsf@iwagami.gniibe.org> References: <23650482.qWgXiaynXq@laptop> <5958382a-fc6e-75de-e92b-74d348c85617@nitrokey.com> <1592457.QghCg7EaO4@laptop> <871s9qe5gv.fsf@iwagami.gniibe.org> Message-ID: <20180919085212.GA8224@astikonas-opti7050.uk.solarflarecom.com> I am getting the error $ ./upgrade_by_passwd.py -k 1 ../regnual/regnual.bin ../src/build/gnuk.bin Admin password: CRC32: ef11fc23 Traceback (most recent call last): File "./upgrade_by_passwd.py", line 157, in main(wait_e, keyno, passwd, data_regnual, data_upgrade[4096:]) File "./upgrade_by_passwd.py", line 51, in main gnuk = get_gnuk_device() File "/run/media/astikonas/home2/gnuk/tool/gnuk_token.py", line 620, in get_gnuk_device raise ValueError("No ICC present") ValueError: No ICC present On Wed, Sep 19, 2018 at 08:44:16AM +0900, NIIBE Yutaka wrote: > Andrius ?tikonas via Gnuk-users wrote: > > I tried upgrade_by_passwd too but it didn't work. This was actually > > the first thing I tried... Well, my gnuk firmware wasn't factory > > firmware. > > My theory is like this: > > (1) Your first try by upgrade_by_passwd.py failed by some other reason. > > (2) Your second try by gnuk_put_binary_libusb.py failed because you > repeat writing to the slot 0. The slot 0 for public key was written > by the process of (1) already. In this situation, writing to the > slot again results GPG_MEMORY_FAILURE (the error code of 0x6581), > because the place can be only written once. > > Please do not use lower level tool like gnuk_put_binary_libusb.py, > unless you don't know the detail. Please use upgrade_by_passwd.py > instead. > > I suggest to identify the original issue, if you have a record of your > trial. If not, please try upgrade_by_passwd.py with the option '-k' to > specify another slot 1, you must record all the session, this time. > Then, please examine your problem in the record and fix your issue(s) at > first. After you will fix your issue, you can try upgrade_by_passwd.py > with the option '-k' specifying slot 2, again. > > Please note that there are only four slots (0, 1, 2, and 3) available > and all are write-once. You can only fail one more time. > -- > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: From szczepan at nitrokey.com Wed Sep 19 11:18:04 2018 From: szczepan at nitrokey.com (Szczepan Zalega | Nitrokey) Date: Wed, 19 Sep 2018 11:18:04 +0200 Subject: Gnuk upgrade In-Reply-To: <20180919085212.GA8224@astikonas-opti7050.uk.solarflarecom.com> References: <23650482.qWgXiaynXq@laptop> <5958382a-fc6e-75de-e92b-74d348c85617@nitrokey.com> <1592457.QghCg7EaO4@laptop> <871s9qe5gv.fsf@iwagami.gniibe.org> <20180919085212.GA8224@astikonas-opti7050.uk.solarflarecom.com> Message-ID: <1f24eefe-b153-6d2b-a902-6ea4397b5738@nitrokey.com> On 09/19/2018 10:52 AM, Andrius ?tikonas via Gnuk-users wrote: > Traceback (most recent call last): > File "./upgrade_by_passwd.py", line 157, in > main(wait_e, keyno, passwd, data_regnual, data_upgrade[4096:]) > File "./upgrade_by_passwd.py", line 51, in main > gnuk = get_gnuk_device() > File "/run/media/astikonas/home2/gnuk/tool/gnuk_token.py", line 620, in get_gnuk_device > raise ValueError("No ICC present") > ValueError: No ICC present This one is caused by communication issues - pcscd and/or scdeamon are keeping the device exclusively. -- Best regards, Szczepan From utzig at apache.org Fri Sep 21 15:10:04 2018 From: utzig at apache.org (Fabio Utzig) Date: Fri, 21 Sep 2018 10:10:04 -0300 Subject: [PATCH] Fix typo in scdaemon reload command doc Message-ID: <20180921131004.30165-1-utzig@apache.org> Signed-off-by: Fabio Utzig --- doc/stop-scdaemon.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/stop-scdaemon.rst b/doc/stop-scdaemon.rst index fdd52a0..1905e03 100644 --- a/doc/stop-scdaemon.rst +++ b/doc/stop-scdaemon.rst @@ -30,9 +30,9 @@ command. Or, you can use ``gpgconf`` command. Type:: - $ gpgconf --reload scdameon + $ gpgconf --reload scdaemon -will do the samething. +will do the same thing. Let GPG-AGENT/SCDAEMON learn -- 2.19.0