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

FEAT | Support SmartCard personalization #35

Open
17 tasks
sevenbitbyte opened this issue May 21, 2024 · 2 comments · May be fixed by #36
Open
17 tasks

FEAT | Support SmartCard personalization #35

sevenbitbyte opened this issue May 21, 2024 · 2 comments · May be fixed by #36
Labels
enhancement New feature or request

Comments

@sevenbitbyte
Copy link
Member

sevenbitbyte commented May 21, 2024

🚀 Feature Proposal

Support setting up a SmartCard with new keys and changing typical personalization settings.

Should support highly featured SmartCards like the Yubikey 4 and above and also traditional credit card format devices like the OpenPGP card. Research ways to support re-programmable JavaCards, it would be nice to be able to flash firmware onto card blanks.

command-fd parsing

  • Remote Control
    • GET_BOOL
    • GET_LINE
    • GET_HIDDEN
    • GOT_IT
    • USERID_HINT
    • NEED_PASSPHRASE
    • NEED_PASSPHRASE_SYM
    • NEED_PASSPHRASE_PIN
    • MISSING_PASSPHRASE
    • BAD_PASSPHRASE
    • GOOD_PASSPHRASE
  • Smartcard related
    • CARDCTL - Parse op codes
    • SC_OP_FAILURE - Parse op code
  • Status Codes
    • NOTE - parser same as WARNING

https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS

@sevenbitbyte sevenbitbyte added the enhancement New feature or request label May 21, 2024
@sevenbitbyte sevenbitbyte linked a pull request May 21, 2024 that will close this issue
1 task
@sevenbitbyte
Copy link
Member Author

GnuPG is defaulting to interactive mode when gpg --card-edit is called. I was able to get input/output working but the protocol is a mix of other output formats so needs more parsing. Makes me wonder if other parts of the library could do a better job parsing output using the --status-fd and --command-fd flags.

https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS

https://github.com/gpg/gnupg/blob/master/doc/DETAILS

@sevenbitbyte
Copy link
Member Author

Derp, silly me, I already wrote a --status-fd parser. Seems like maybe just missing a few

https://github.com/datapartyjs/gpg-promised/blob/master/src/gpg-parser.js#L252-L260

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

Successfully merging a pull request may close this issue.

1 participant