Closed olegshtch closed 1 year ago
Yes, it fixes unsupported command.
gnupg-pkcs11-scd[17360]: chan_0 <- GETATTR APPTYPE
gnupg-pkcs11-scd[17360]: chan_0 -> S APPTYPE PKCS11
gnupg-pkcs11-scd[17360]: chan_0 -> OK
Gpg now answers with:
gpg: key operation not possible: not an OpenPGP card
No, it seems I've done something wrong with the serial number. Can you please send me a bit more of the log with all attributes?
I don't remember how I got gpg to call GETATTR $DISPSERIALNO
. It isn't part of addcardkey
.
please provide full logs
I managed to create master key and subkeys and deleted logs after tries. Or do you need addcardkey
logs?
I will be happy to resolve this issue... I will be able to do this if you start fresh and confirm it is working :)
GETATTR $DISPSERIALNO
was called with gpg --card-status --with-keygrip
and was cached later. With clean ~/.gnupg/
folder I could reproduce the call.
gnupg-pkcs11-scd[4919]: chan_0 <- GETATTR $DISPSERIALNO
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_enumTokenIds entry method=1, p_token_id_list=0x7ffd057028b0
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: _pkcs11h_session_getSlotList entry provider=0x561e86b62e80, token_present=1, pSlotList=0x7ffd05702778, pulCount=0x7ffd05702780
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: _pkcs11h_session_getSlotList return rv=0-'CKR_OK' *pulCount=1
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: _pkcs11h_token_getTokenId entry p_token_id=0x561e86c52ca8
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: _pkcs11h_token_newTokenId entry p_token_id=0x7ffd05702710
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: _pkcs11h_token_newTokenId return rv=0-'CKR_OK', *p_token_id=0x561e86c6f680
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: _pkcs11h_token_getTokenId return rv=0-'CKR_OK', *p_token_id=0x561e86c6f680
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_enumTokenIds return rv=0-'CKR_OK', *p_token_id_list=0x7ffd057028b0
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_serializeTokenId entry sz=(nil), *max=0000000000000000, token_id=0x561e86c6f680
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_serializeTokenId return rv=0-'CKR_OK', *max=000000000000004e, sz='(null)'
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_serializeTokenId entry sz=0x561e86b9e700, *max=000000000000004e, token_id=0x561e86c6f680
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_serializeTokenId return rv=0-'CKR_OK', *max=000000000000004e, sz='Aktiv\x20Co\x2E/Rutoken\x20ECP/411d5727/Rutoken\x20ECP\x20\x3Cno\x20label\x3E'
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_freeTokenIdList entry token_id_list=0x561e86c52ca0
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_freeTokenId entry certificate_id=0x561e86c6f680
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_freeTokenId return
gnupg-pkcs11-scd[4919.2399018048]: PKCS#11: pkcs11h_token_freeTokenIdList return
gnupg-pkcs11-scd[4919]: chan_0 -> S $DISPSERIALNO D2760001240111503131B71F5E411111
gnupg-pkcs11-scd[4919]: chan_0 -> OK
Thanks, but I do not see the failure, it is very difficult to decipher the issue when you do not provide the full log.
Looks like not an OpenPGP card
isn't related to the issue and unimplemented commands:
Correct, this why I wanted to see entire log as SERIALNO
should be D2760001240111503131B71F5E411111
which meets required conditions. But once again you do not provide it.
SERAILNO
was the same D2760001240111503131B71F5E411111
as I sent at start.
Without FULL log, I cannot trace the sequence. Please debug this yourself based on the information you do not share and provide a patch. Also, I am unsure what version is 2.2.40 there is no tag of this version. I invested enough time.
When I trying to add subkey I got error:
In log I see:
Same for
GnuPG version is 2.2.40