Changing object labels on SmartCard-HSM

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Changing object labels on SmartCard-HSM

Marek Szuba
Hello again,

Every time I create a key pair on my SmartCard-HSM using Firefox, both
the private and the public key get assigned the generic label "Private
key". When I subsequently import the certificate produced by my CA to
the card, the privkey and the cert (raw pubkey disappears upon import)
get relabelled to just as generic "Certificate". I would like to change
these labels so that it is easier for me to see what is what in the
object dump. According to documentation, one can do this by executing
something along the lines of

pkcs15-init -A <type> -i <ID> -l <label> {-a <pinid>}

However, what I get instead is the error

Failed to change attribute(s): Invalid arguments

This happens for any object type, both with whether without the auth ID
explicitly specified, and regardless of whether or not I specify the PIN
on the command line (incidentally, if I don't I do not get asked for it
before the error appears).

The relevant lines in OpenSC debug log appear to be:

[pkcs15-init] pkcs15-lib.c:3539:sc_pkcs15init_update_file: called
[pkcs15-init] pkcs15-lib.c:3541:sc_pkcs15init_update_file: returning
with: -1300 (Invalid arguments)
[pkcs15-init] pkcs15-lib.c:2753:sc_pkcs15init_update_any_df: Failed to
encode or update xDF: -1300 (Invalid arguments)

Am I doing something wrong or is this feature simply not supported on
this card?

Yours sincerely,


Opensc-devel mailing list
[hidden email]

signature.asc (836 bytes) Download Attachment