Skip to content

Writing key to card with gpg doesn't work #12

@conorpp

Description

@conorpp

Gnupg is having some issue with the current openpgp implementation. I suspect it's something small in the "Application Related Data" (006e).

Steps to reproduce.

  1. Generate a key with gpg2
gpg2 --expert --full-generate-key

Select (1) RSA and RSA. 2048 bit RSA key.

  1. Write key to card.
gpg2 --expert --edit-key <key-id>

Then:

key 1
keytocard

It should prompt for the admin PIN, and then fail with "gpg: KEYTOCARD failed: General error".

I was able to get traces of the APDUs with Wireshark using this script, and also just running pcscd in the foreground: sudo pcscd -f -T -a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions