On Sep 27, 2009, at 18:51, gilles Bernabé wrote:

Hello,

I was trying to use opensc for the first time with cyberflex cards 32K and 64K i've succesfully load the Muscle applet CardEdgeCF.cap and CardEdgeII.ijc in the cards from here :
http://www.opensc-project.org/opensc/wiki/Cyberflex and here 
:http://www.openscdp.org/scripts/musclecard/index.html
i'm able to initialize the pin(SO and user) with both with this command :"pkcs15-init -EC -p pkcs15+onepin",

but when i try to to load a certificate externally generated by openssl, i've got error:

"r...@admin1-laptop:~/JavaCard_SDK2# pkcs15-init -S moi2.key -a 1 -u sign,decrypt --split-key
Please enter passphrase to unlock secret key:
User PIN required.
Please enter User PIN:
[pkcs15-init] iso7816.c:102:iso7816_check_sw: Unknown SWs; SW1=9C, SW2=02 [pkcs15-init] sec.c:201:sc_pin_cmd: returning with: Card command failed [pkcs15-init] pkcs15-lib.c:3105:do_get_and_verify_secret: Failed to verify user PIN (ref=0x1) [pkcs15-init] pkcs15-muscle.c:192:muscle_store_key: returning with: Not supported
Failed to store private key: Not supported"

9C02 is SW_AUTH_FAILED; it appears the PIN you entered is incorrect.

Could you try setting to PIN to '00000000' and see if it works?

(error too if i try the internal generation: "pkcs15-init -G RSA -a 1 -v -u sign,decrypt --split-key")

I've try too the pkcs11-tool without success:

"r...@admin1-laptop:~/JavaCard_SDK2# pkcs11-tool --init-token -- label "gilles" --so-pin 12345678 [opensc-pkcs11] pkcs15.c:761:sc_pkcs15_bind: returning with: Unsupported card [opensc-pkcs11] iso7816.c:102:iso7816_check_sw: Unknown SWs; SW1=9C, SW2=05 [opensc-pkcs11] iso7816.c:102:iso7816_check_sw: Unknown SWs; SW1=9C, SW2=05 error: PKCS11 function C_InitToken failed: rv = CKR_GENERAL_ERROR (0x5)

Aborting."
9C05 is SW_UNSUPPORTED_FEATURE.


Is there a method to load a certificate on this cards or do you know compatible cards(recent cards not old) like jcops, in order to use it with firefox and PKCS11 on linux?
I use the Muscle applet and OpenSC with an Aladdin eToken 72K. It is a pretty recent card and it works wonderfully: key generation works (up to 2048 bit), key loading, etc... But you must get the engineering version in order to load custom applets.

I've heard about people using a very recent version of the JCOP card with Muscle + OpenSC: the JCOP31 v2.4.1. Which is, like the Aladdin eToken 72K, a Java 2.2.2 card that supports nice things like extended APDUs, has a nice amount of RAM, is (really) fast, etc.



thanks ,
Kind regards

Good luck!
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to