From: Viktor T. <vik...@gm...> - 2013-03-10 12:13:46
|
Hello, Le 08/03/2013 05:45, Nguyễn Hồng Quân a écrit : > I'm implementing DATA object support for pkcs15-openpgp emulation layer. > These pkcs15 DATA objects are mapped to private DOs of OpenPGP card and > need PIN2 to access. > > However, when listing objects by pkcs11-tools, these pkcs15 DATA objects > appears in the slot of PIN1: http://paste.ubuntu.com/5595070/ and cannot > be read. Private DATA object, by definition, is protected by some AuthentificationObject (PIN). The object's 'auth_id' has to reference this authObject. So, in your emulation layer, when creating PKCS#15 DATA object, you have to set it's 'auth_id' to reference PIN2, in the same manner as you do it for private key PKCS#15 objects: https://github.com/OpenSC/OpenSC/blob/master/src/libopensc/pkcs15-openpgp.c#L283 > I want to move it to slot 2, to be able to use PIN2 to read it. How can > I do? > > (Other objects, KEY and CERT, are listed in slot 2: > http://paste.ubuntu.com/5595074/) Kind regards, Viktor. |