xca
xca copied to clipboard
BUG: When aborting a key generation on a smartcard, the entry remains in the database but is incomplete. This causes an error pop-up during startup
While generating a new ECC key on a token, during the stage where the device's PIN is asked for, I clicked "Cancel" to abort. After that, the "key" entry appeared on the Private Keys tab and had a length of 0bit. After closing and re-opening the program, the entry with the length of 0bit disappeared but, before the program's main UI appears, I get the following error. After clicking on "OK", the main UI appears.
" The following error occurred: error:**********:asn1 encoding routines::too small "
The asterisks ("*") are there to replace a number, just in case it is private information (I am not sure), even though it is probably the Error Code.
I am also attaching a screen grab:
Hello,
I finally managed to spend some time to work on it; and, I believe that I have found a workaround (no guarantees, you take the risk):
I used DB Browser for SQLite (https://sqlitebrowser.org/) to browse the data of the database and made the following changes, which seem to have fixed the issue:
- In Table "public_keys", look for the item without a Public Key ("public") and Length ("len"). Make sure to note ID of the Item ("item"). Delete the whole Record of that Item.
- In Table "tokens", also find and delete the whole Record with the same "item" ID.
- In Table "items", find the Record with "id" the same as "item" from the previous Tables. There is a column called "del". Change the value of "del" for that Record to "1" (DO NOT delete this Record).
- Click on "Write Changes" to save.