Marek Szuba
2015-10-13 10:33:48 UTC
Hello,
A while ago I tried to import several existing X.509 certificates and
its corresponding private key into my SmartCard-HSM, using OpenSC-0.14.
It turned out that I could do that - which surprised me a bit because
later on I read on-line importing shouldn't work for this card - but
only for one certificate at a time, with each subsequent import
overwriting the previous one. I then decided that I'd rather have no
software-generated certificates on the card than have just one and
proceeded to delete the imported data, using pkcs11-tool. The cert and
the pubkey both went without trouble, however whenever I attempt to
delete the private key I get an error:
$ pkcs11-tool --module /usr/lib/opensc-pkcs11.so -l --delete-object
--type privkey --id 11ac7c18d526f536d80520d4c03b71f4923d4553
Using slot 1 with a present token (0x1)
Logging in to "SmartCard-HSM (UserPIN)".
Please enter User PIN:
error: PKCS11 function C_DestroyObject() failed: rv = CKR_GENERAL_ERROR
(0x5)
The same happens now with OpenSC-0.15.
Is there any way I could get rid of this key from the card without
reinitialising it?
Yours sincerely,
A while ago I tried to import several existing X.509 certificates and
its corresponding private key into my SmartCard-HSM, using OpenSC-0.14.
It turned out that I could do that - which surprised me a bit because
later on I read on-line importing shouldn't work for this card - but
only for one certificate at a time, with each subsequent import
overwriting the previous one. I then decided that I'd rather have no
software-generated certificates on the card than have just one and
proceeded to delete the imported data, using pkcs11-tool. The cert and
the pubkey both went without trouble, however whenever I attempt to
delete the private key I get an error:
$ pkcs11-tool --module /usr/lib/opensc-pkcs11.so -l --delete-object
--type privkey --id 11ac7c18d526f536d80520d4c03b71f4923d4553
Using slot 1 with a present token (0x1)
Logging in to "SmartCard-HSM (UserPIN)".
Please enter User PIN:
error: PKCS11 function C_DestroyObject() failed: rv = CKR_GENERAL_ERROR
(0x5)
The same happens now with OpenSC-0.15.
Is there any way I could get rid of this key from the card without
reinitialising it?
Yours sincerely,
--
MS
MS