I’m trying to store CA signed certificate on my NitroKey Pro. I’m getting errors from both GnuPG and OpenSC when trying to write certificate to card.
Using “gpg2 --edit-card”, command writecertificate 3 < mycert.der
gpg fails with error
gpg: error writing certificate to card: Provided object is too large
Using “pkcs15-init --store-certificate mycert.pem --id 3”
OpenSC fails with error
Failed to store certificate: Transmit failed
Thanks for the info. I found my problem was that I was storing the certificate in PEM format, which is larger in size than DER format. I was able to put certificate to NitroKey using gpg writecert when using DER format.