datapartyjs / gpg-promised

The GPG interface for nodejs we were promised
http://dataparty.xyz
Apache License 2.0
1 stars 1 forks source link

FEAT | Support SmartCard personalization #35

Open sevenbitbyte opened 1 month ago

sevenbitbyte commented 1 month ago

🚀 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

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

sevenbitbyte commented 1 month ago

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 commented 1 month ago

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