Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #471

Open
ARGYROU-MINAS opened this issue Oct 5, 2023 · 1 comment

Comments

@ARGYROU-MINAS
Copy link

ARGYROU-MINAS commented Oct 5, 2023

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:

image

@ARGYROU-MINAS ARGYROU-MINAS changed the title 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. 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 Oct 5, 2023
@ARGYROU-MINAS ARGYROU-MINAS changed the title 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 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 Oct 6, 2023
@ARGYROU-MINAS
Copy link
Author

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:

  1. 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.
  2. In Table "tokens", also find and delete the whole Record with the same "item" ID.
  3. 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).
  4. Click on "Write Changes" to save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant