Yubico / libykneomgr

YubiKey NEO CCID Manager C Library
https://developers.yubico.com/libykneomgr/
GNU Lesser General Public License v3.0
11 stars 11 forks source link

error in ykneomgr -i ./applet/bin/openpgpcard/javacard/openpgpcard.cap -d #4

Closed chrisbgit closed 10 years ago

chrisbgit commented 11 years ago

System: atom n455 OS: Debian testing amd64

bash% ykneomgr -i ./applet/bin/openpgpcard/javacard/openpgpcard.cap -d Trying reader 0: Yubico Yubikey NEO OTP+CCID 00 00 atr length 20 atr: 3b fa 13 00 00 81 31 fe 15 59 75 62 69 6b 65 79 4e 45 4f a6 atr: . . . . . . 1 . . Y u b i k e y N E O .
logicalChannel 0 specVersion 211 --> 13: 00 a4 04 00 08 a0 00 00 05 27 20 01 01 Command --> 00A4040008A000000527200101 Wrapped command --> 00A4040008A000000527200101 Response <-- 030102018507820000009000 <-- 12: 03 01 02 01 85 07 82 00 00 00 90 00 versionMajor 3 versionMinor 1 versionBuild 2 pgmSeq 1 touchLevel 34055 mode 82 crTimeout 0 autoEjectTime 0 --> 4: 00 01 10 00 Command --> 00011000 Wrapped command --> 00011000 Response <-- 002016E69000 <-- 6: 00 20 16 e6 90 00 serialno 2103014 --> 13: 00 a4 04 00 08 a0 00 00 00 03 00 00 00 Command --> 00A4040008A000000003000000 Wrapped command --> 00A4040008A000000003000000 Response <-- 6F658408A000000003000000A5599F6501FF9F6E06479112103800734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B040255650B06092B8510864864020103660C060A2B060104012A026E01029000 <-- 105: 6f 65 84 08 a0 00 00 00 03 00 00 00 a5 59 9f 65 01 ff 9f 6e 06 47 91 12 10 38 00 73 4a 06 07 2a 86 48 86 fc 6b 01 60 0c 06 0a 2a 86 48 86 fc 6b 02 02 01 01 63 09 06 07 2a 86 48 86 fc 6b 03 64 0b 06 09 2a 86 48 86 fc 6b 04 02 55 65 0b 06 09 2b 85 10 86 48 64 02 01 03 66 0c 06 0a 2b 06 01 04 01 2a 02 6e 01 02 90 00 Command --> 8050000008A52A99081213FEEF00 Wrapped command --> 8050000008A52A99081213FEEF00 Response <-- 00003107003234967007FF020019DFABEED157EA14F0CE513FDE59EF9000 Command --> 848203001039887FB12A1276EF4CB90DBBD09AA4F6 Wrapped command --> 848203001039887FB12A1276EF4CB90DBBD09AA4F6 Response <-- 9000 Command --> 80E602001906D2760001240108A0000000030000000006EF04C60228400000 Wrapped command --> 84E6020028CF2CCD753DBDC5F6F8C1A588A34BFA2E7D6067E4A5C74DA2B34DC3E537E1A18F1F5D71CE7867BA6300 Response <-- 009000 Command --> 80E80000EFC4822835010010DECAFFED010204010006D2760001240102001F0010001F0014002902BE005A1961007603F7000006C500240007004204010004002904050107A0000000620101050107A0000000620201050107A0000000620102000107A00000006200010300140110D2760001240102000000000000010000002106005A0180032600150701000002928000000083000900090109000013CA142D146614A214B315F217A717BA17BF018300040004011100001835183D185B1877188B189F18B318BF18CB18CF18D518E918FD191119251939194D80000007196104030600FE042A003E030680FE04590000042A Wrapped command --> 84E80000F8D8288789897533D4CB85068E7E7CBFB5033A7D8264E5D46B8A34234B225A5A5D1A2E1EF029FBB2D8FBEB05A7014E2D8C993597A52CEDE2A3C85E613434DF4A2DDA642837D128748B3A40F2C3055024DF26F8E617FAC4FD6F527AA5CA7B12788F6BB4F65E9891A7C68E3B5A01911671D15AF3648C6EA1031D07811D9439D2BC6E40EE765A78EBA1BCBE8DD4E4C40584BC7BA2D8E8F8F2E848E62ED5C51621D9B7B2024DBCE437B0845D11CD91FBBB288DC150384B83EDAD0EA4CD9751C7F40458D88E9EB85C2334E551B64F78D8B13DA0EC12FD0267548AC0ABC2AD7E6B1EA961E4487E47393277173C87F6935B84E343A7597619AF0DE43B Response <-- 6A80 load() returns 0x80206A80 (6A80: Wrong data / Incorrect values in command data.) error: ykneomgr_applet_install (-4): Backend error

klali commented 11 years ago

to clarify: what version of the openpgp applet are you trying to load (is it ykneo-openpgp?) have you made any modifications to that code?

I think 6a80 is returned from install when the applet is trying to use functions not available in the chip. If the EEPROM gets full during install 6a84 should be returned.

jas4711 commented 11 years ago

I think Chris said he had used JCKit 3.0.4 instead of 2.2.2 in private email. We haven't tested that a lot, maybe that is the source of the problems? Let's see if we can reproduce it.

klali commented 11 years ago

Yeah.. 3.0.4 shouldn't be used, that's a new javacard spec, if 3 is needed 3.0.3 should be used. (spec 3.0.1)

/klas

jas4711 commented 11 years ago

Chris, can you try 2.2.2 as per the README instructions? And/or try 3.0.3 as well. With 2.2.2, I think you should be able to rebuild exactly the same CAP file as we did.

jas4711 commented 10 years ago

I've reproduced the error with jckit 3.0.4. With jckit 3.0.3 it appears to work. Thus I believe this is not a bug in libykneomgr, but a property of the hardware.