Yubico / ykneo-oath

OATH App for the YubiKey NEO
https://developers.yubico.com/ykneo-oath/
GNU General Public License v3.0
63 stars 40 forks source link

Error 6985 Conditions of use not satisfied when installing #15

Open jraynes opened 6 years ago

jraynes commented 6 years ago

I'm trying to install this applet to a Global Platform javacard compliant with both the 2.1 and 2.2 spec. The applet loads fine but when GPShell tried to make it selectable it fails with SW 6985 - Conditions of use not satisfied. See full gpshell transcript below:

GPShell.exe gpinstall.txt
mode_211
enable_trace
establish_context
card_connect
select -AID a000000003000000
Command --> 00A4040008A000000003000000
Wrapped command --> 00A4040008A000000003000000
Response <-- 6F5C8408A000000003000000A550734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B040255650B06092B8510864864020103660C060A2B060104012A026E01029F6501FF9000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
Command --> 80CA006600
Wrapped command --> 80CA006600
Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B040255650B06092B8510864864020103660C060A2B060104012A026E01029000
Command --> 80500000082186CA03ABF2BCBF00
Wrapped command --> 80500000082186CA03ABF2BCBF00
Response <-- 000061570702B0710528FF0200A2146BDD692A3BF0DAD0A605717F789000
Command --> 8482010010D94B2C94E11E22BB8F0AA7EFCDD30D8B
Wrapped command --> 8482010010D94B2C94E11E22BB8F0AA7EFCDD30D8B
Response <-- 9000
delete -AID a000000527210101
Command --> 80E400800A4F08A00000052721010100
Wrapped command --> 84E40080124F08A000000527210101589F0797711D47DF00
Response <-- 6A88
delete() returns 0x80206A88 (6A88: Referenced data not found.)
delete -AID a0000005272101
Command --> 80E40080094F07A000000527210100
Wrapped command --> 84E40080114F07A0000005272101172AE86B3471EE7D00
Response <-- 009000
install -file ./applet/bin/pkgYkneoOath/javacard/pkgYkneoOath.cap -instParam 00 -priv 00
Command --> 80E602001A07A000000527210108A0000000030000000006EF04C60213C80000
Wrapped command --> 84E602002207A000000527210108A0000000030000000006EF04C60213C800BE387B8BBA39338500
Response <-- 009000
Command --> 80E80000EFC48213B8010011DECAFFED010204010007A000000527210102001F0011001F000C001F015A00360CAC001001660000038D000C0001000303010004001F03000107A0000000620001030107A0000000620102030107A000000062010103000C0108A00000052721010104610600360080000E000701100000002C00E000E700EC00F1010D011D0122014A01CF036603CB03D303D803DF040300820307000707010000046C070CAC000210188C002D1803890018038801181040900B8702181040900B87037B0017670B1020058D00267F00177A04511F100F53046A0F1F100F53056A081169848D00271F10F0531010
Wrapped command --> 84E80000F7C48213B8010011DECAFFED010204010007A000000527210102001F0011001F000C001F015A00360CAC001001660000038D000C0001000303010004001F03000107A0000000620001030107A0000000620102030107A000000062010103000C0108A00000052721010104610600360080000E000701100000002C00E000E700EC00F1010D011D0122014A01CF036603CB03D303D803DF040300820307000707010000046C070CAC000210188C002D1803890018038801181040900B8702181040900B87037B0017670B1020058D00267F00177A04511F100F53046A0F1F100F53056A081169848D00271F10F053101064245E41E82AAFA5
Response <-- 009000
Command --> 80E80001EF6A101F10F05310206A081169848D0027160410406F08116A808D00271F100F53046B177B0028670A04038D002B7F0028187B00288704701C1F100F53056B157B002E670A07038D002B7F002E187B002E8704181F880518038900AD0203104010368D001D3BAD03031040105C8D001D3B032905160516046D20AD021605191E2510365738AD031605191E25105C573859050159020170DE7A0220181D88067A0110AE06780110AE05780540AD076709181040900B8707181F8908191EAD07031F8D002A3B7A0530AD0703191EAF088D002A3BAF08780110AF08780420181D88091D0453046B1DAD0A670B181040900B
Wrapped command --> 84E80001F76A101F10F05310206A081169848D0027160410406F08116A808D00271F100F53046B177B0028670A04038D002B7F0028187B00288704701C1F100F53056B157B002E670A07038D002B7F002E187B002E8704181F880518038900AD0203104010368D001D3BAD03031040105C8D001D3B032905160516046D20AD021605191E2510365738AD031605191E25105C573859050159020170DE7A0220181D88067A0110AE06780110AE05780540AD076709181040900B8707181F8908191EAD07031F8D002A3B7A0530AD0703191EAF088D002A3BAF08780110AF08780420181D88091D0453046B1DAD0A670B181040900BF2F8CE1CF16642C9
Response <-- 009000
Command --> 80E80002EF870A7010AD0A031040038D001D3B1803890B7A03107B0015670C183D7F00167F001570207B00157B0016690E7B0015183D7F0016870C700C7B0016183D7F0016870C7A02017B00152B186610188B00186104700818830C2B70F118670E8F00193D8C001A2B188B001B187705317B00152E1B66241B8B001860181E1B85086A047010181D1B8307031E8D001C610470081B830C2E70DD1B770666012806AE0510F0531020A300831F10406E051F6108116A808D0027AE090453046B6710401F432907AF0B16076D06AF0B700416072908160810406D1C160816076D16AD0A160825610470081169828D002759080170
Wrapped command --> 84E80002F7870A7010AD0A031040038D001D3B1803890B7A03107B0015670C183D7F00167F001570207B00157B0016690E7B0015183D7F0016870C700C7B0016183D7F0016870C7A02017B00152B186610188B00186104700818830C2B70F118670E8F00193D8C001A2B188B001B187705317B00152E1B66241B8B001860181E1B85086A047010181D1B8307031E8D001C610470081B830C2E70DD1B770666012806AE0510F0531020A300831F10406E051F6108116A808D0027AE090453046B6710401F432907AF0B16076D06AF0B700416072908160810406D1C160816076D16AD0A160825610470081169828D0027590801709613269A272423ED
Response <-- 009000
Command --> 80E80003EFE216081607431E412909191609AD0A16081F8D001C290A160A026B081169828D0027181607890B191EAD0A16071F8D002A3B192806A800CEAE0510F0531010A300BE7B0017031008038D001D3BAD0D661AAD0D03256121AD0D0425611BAD0D05256115AD0D0625610F7B00171006AF008D001E3B7075AD0D037B001707078D001F3B032907AF001008511100FF532908AF001100FF5329091007290A160A654B7B0017160A251100FF53290B160A10076B0B160B160941290B700F160A10066B09160B160841290B160B160741290B160B1008515B29077B0017160A160B5B38160A04435B290A70B5183D85000441
Wrapped command --> 84E80003F7E216081607431E412909191609AD0A16081F8D001C290A160A026B081169828D0027181607890B191EAD0A16071F8D002A3B192806A800CEAE0510F0531010A300BE7B0017031008038D001D3BAD0D661AAD0D03256121AD0D0425611BAD0D05256115AD0D0625610F7B00171006AF008D001E3B7075AD0D037B001707078D001F3B032907AF001008511100FF532908AF001100FF5329091007290A160A654B7B0017160A251100FF53290B160A10076B0B160B160941290B700F160A10066B09160B160841290B160B160741290B160B1008515B29077B0017160A160B5B38160A04435B290A70B5183D850004412BFE72ED72FA7B6A
Response <-- 009000
Command --> 80E80004EF89007B00172806033110083270081169848D0027AD048B0020AD04AD020310408B0021AD0415061E1F150416058B00222907AD048B0020AD04AD030310408B0021AD04150416051607150416058B002278066218191E1F7B0017038B002329067B00171606044325100F532907150416055905017B0017160759070125107F5338150416055905017B001716075907012538150416055905017B001716075907012538150416055905017B00171607590701253807780110AD048B0024780110AE01780220181D88017A0631AD0D67081807900B870D03321F076D13AD0D1F191E59020125381F04415B3270ED7A04
Wrapped command --> 84E80004F789007B00172806033110083270081169848D0027AD048B0020AD04AD020310408B0021AD0415061E1F150416058B00222907AD048B0020AD04AD030310408B0021AD04150416051607150416058B002278066218191E1F7B0017038B002329067B00171606044325100F532907150416055905017B0017160759070125107F5338150416055905017B001716075907012538150416055905017B001716075907012538150416055905017B00171607590701253807780110AD048B0024780110AE01780220181D88017A0631AD0D67081807900B870D03321F076D13AD0D1F191E59020125381F04415B3270ED7A04434990846CAEE23E
Response <-- 009000
Command --> 80E80005EF10AD0D660BAD0D0307038D001D3B7A0410188C0025181020058D0026870E18110800058D0026870F1808058D0026871018048D00298711181008900B8712AD11AD120310088B002C188F00193D8C001A8713188F00193D8C001A87147A02308F002F3D8C00303B7A0626188B00319800AA198B00322D03321A1F5903011079381A1F5903017B0033925B387B0033031A1F7B0033928D001F3B1F7B0033925B41321A1F590301107138AD129229041A1F59030116045B38AD12031A1F16048D001F3B1F16044132AD138B001860451A1F5903011074381A1F590301100838AD111A1F10088B002CAD131A1F1008AD0E
Wrapped command --> 84E80005F710AD0D660BAD0D0307038D001D3B7A0410188C0025181020058D0026870E18110800058D0026870F1808058D0026871018048D00298711181008900B8712AD11AD120310088B002C188F00193D8C001A8713188F00193D8C001A87147A02308F002F3D8C00303B7A0626188B00319800AA198B00322D03321A1F5903011079381A1F5903017B0033925B387B0033031A1F7B0033928D001F3B1F7B0033925B41321A1F590301107138AD129229041A1F59030116045B38AD12031A1F16048D001F3B1F16044132AD138B001860451A1F5903011074381A1F590301100838AD111A1F10088B002CAD131A1F1008AD0EBFA6C9CC01ECA39B
Response <-- 009000
Command --> 80E80006EF038B00233B5903081A1F590301107B381A1F59030104381A1F590301AD138B00343819031F8B00357A198B00322D198B00363B03321A052529041A06252905160416058D003729061A04252907AD138B0018601A160710A36A141607076A0FAD100325046A081169828D002716077500F50009FFA1007FFFA20094FFA300B5FFA400CBFFA500EC000100290002003E00030053000400681606610A181A8C0038A800C9116B008D0027A800C01606610A181A8C0039A800B4116B008D0027A800AB1606610A181A8C003AA8009F116B008D0027A80096160611DEAD6B09188C003BA80088116B008D0027A8007F1606
Wrapped command --> 84E80006F7038B00233B5903081A1F590301107B381A1F59030104381A1F590301AD138B00343819031F8B00357A198B00322D198B00363B03321A052529041A06252905160416058D003729061A04252907AD138B0018601A160710A36A141607076A0FAD100325046A081169828D002716077500F50009FFA1007FFFA20094FFA300B5FFA400CBFFA500EC000100290002003E00030053000400681606610A181A8C0038A800C9116B008D0027A800C01606610A181A8C0039A800B4116B008D0027A800AB1606610A181A8C003AA8009F116B008D0027A80096160611DEAD6B09188C003BA80088116B008D0027A8007F1606ED7EE80A2EB73F39
Response <-- 009000
Command --> 80E80007EF610B18AD0F8C003C327071116B008D0027706916046117160560071605046B0E181A1605AD0F8C003D327050116B008D002770481606610C181AAD0F8C003E32703A116B008D0027703216046117160560071605046B0E181A1605AD0F8C003F327019116B008D00277011AD10068D0040327008116D008D00271F650818191F8C00417A0410017F0015017F0016AD100308038D001D3BAD11AD120310088B002CAD13038B00428D00437A0633AD138B001861081169848D00270832191F5903012510756A08116A808D002718191F8C004429041604AD138B00456A08116A808D00271F1816048C00464132191FAD
Wrapped command --> 84E80007F7610B18AD0F8C003C327071116B008D0027706916046117160560071605046B0E181A1605AD0F8C003D327050116B008D002770481606610C181AAD0F8C003E32703A116B008D0027703216046117160560071605046B0E181A1605AD0F8C003F327019116B008D00277011AD10068D0040327008116D008D00271F650818191F8C00417A0410017F0015017F0016AD100308038D001D3BAD11AD120310088B002CAD13038B00428D00437A0633AD138B001861081169848D00270832191F5903012510756A08116A808D002718191F8C004429041604AD138B00456A08116A808D00271F1816048C00464132191FADCD7317BEB5D42219
Response <-- 009000
Command --> 80E80008EF0E0316048D001C6109AD100304387008116A808D00271F16044132191F5903012510746A08116A808D002718191F8C00442904160410086D08116A808D00271F1816048C00464132AD13191F1604AD0E038B002329051A031075381A0416055B38AD0E031A0516058D001F3B160505417806250831191E5902012510736A08116A808D002718191E8C0044321E181F8C004641311F610BAD13038B0042A800A4191E590201252904AD14191E16041F04438B00471E1F04434131191E5902012510746A08116A808D002718191E8C0044321E181F8C00464131AD14191E1FAD0E038B002329051E1F4131191E590201
Wrapped command --> 84E80008F70E0316048D001C6109AD100304387008116A808D00271F16044132191F5903012510746A08116A808D002718191F8C00442904160410086D08116A808D00271F1816048C00464132AD13191F1604AD0E038B002329051A031075381A0416055B38AD0E031A0516058D001F3B160505417806250831191E5902012510736A08116A808D002718191E8C0044321E181F8C004641311F610BAD13038B0042A800A4191E590201252904AD14191E16041F04438B00471E1F04434131191E5902012510746A08116A808D002718191E8C0044321E181F8C00464131AD14191E1FAD0E038B002329051E1F4131191E59020111735F2FA39B9B7E
Response <-- 009000
Command --> 80E80009EF2510756A08116A808D002718191E8C0044321E181F8C004641311F16056A08116A808D0027191EAD0E031F8D001C611EAD13280618AD14871318150687141506038B0042AD13048B004270081169848D00277A06440829041916045904012510716A08116A808D0027181916048C0044290516041816058C004641290419160416058D00482806150667081169848D0027160416054129041916045904012510746A08116A808D0027181916048C0044290516041816058C00464129040329071E611C15061916041605AD0E038B002329051B1607590701107538701A15061916041605AD0E038B004929051B1607
Wrapped command --> 84E80009F72510756A08116A808D002718191E8C0044321E181F8C004641311F16056A08116A808D0027191EAD0E031F8D001C611EAD13280618AD14871318150687141506038B0042AD13048B004270081169848D00277A06440829041916045904012510716A08116A808D0027181916048C0044290516041816058C004641290419160416058D00482806150667081169848D0027160416054129041916045904012510746A08116A808D0027181916048C0044290516041816058C00464129040329071E611C15061916041605AD0E038B002329051B1607590701107538701A15061916041605AD0E038B004929051B160786D017D4A8EC0C3F
Response <-- 009000
Command --> 80E8000AEF5907011076381607181B1607160504418C004A4129071B160759070115068B004B38AD0E031B160716058D002A3B16051816058C00464105417807440829041916045904012510746A08116A808D0027181916045904018C00442905191604AD0E0316058D001F3B0329047B0015280615069E00AB15068B00186105A800981B16045904011071381B160459040115068B004C5B38160415061B16048B004D41290403290715068B003410F05310206B3D1E611E1B16045904011075381506AD0E0316051B160405418B0023290770271B16045904011076381506AD0E0316051B160405418B00492907700B1B1604
Wrapped command --> 84E8000AF75907011076381607181B1607160504418C004A4129071B160759070115068B004B38AD0E031B160716058D002A3B16051816058C00464105417807440829041916045904012510746A08116A808D0027181916045904018C00442905191604AD0E0316058D001F3B0329047B0015280615069E00AB15068B00186105A800981B16045904011071381B160459040115068B004C5B38160415061B16048B004D41290403290715068B003410F05310206B3D1E611E1B16045904011075381506AD0E0316051B160405418B0023290770271B16045904011076381506AD0E0316051B160405418B00492907700B1B1604FA24F7057704E0F8
Response <-- 009000
Command --> 80E8000BEF5904011077381B1604590401160704415B381B160459040115068B004B38160416074129041506830C2806A8FF56160478042203317B00152E1B66381B8B00186104702A191E590201107238191E5902011B8B004C04415B38191E5902011B8B0034381E1B191E8B004D41311B830C2E70C91E7804230831191E5902012510716A08116A808D002718191E8C0044321E181F8C00464131191E1F8D004828041504660A1504038B004270081169848D00277A031203307B00152D1A661A1A8B00186104700C1D1A8B004C10094141301A830C2D70E71D7806250831191E5902012510716A08116A808D002718191E8C
Wrapped command --> 84E8000BF75904011077381B1604590401160704415B381B160459040115068B004B38160416074129041506830C2806A8FF56160478042203317B00152E1B66381B8B00186104702A191E590201107238191E5902011B8B004C04415B38191E5902011B8B0034381E1B191E8B004D41311B830C2E70C91E7804230831191E5902012510716A08116A808D002718191E8C0044321E181F8C00464131191E1F8D004828041504660A1504038B004270081169848D00277A031203307B00152D1A661A1A8B00186104700C1D1A8B004C10094141301A830C2D70E71D7806250831191E5902012510716A08116A808D002718191E8CEF315136F5EA1372
Response <-- 009000
Command --> 80E8000CEF0044321E181F8C00464131188C004E1F411009411108006F08116A848D0027191E1F8D004828041504670F8D004F28041504191E1F8B00501E1F4131191E5902012510736A08116A808D002718191E8C0044321E181F8C00464131191E5902012529051605100F53046A101605100F53056A08116A808D0027160510F05310206A11160510F05310106A08116A808D0027191E5902012529061504038B0042150416068B00511504191E16051F05438B00471E1F054341311E19926D19191E2510786B125902011504191E590201258B005270081504038B00521E19926D29191E25107A6B22590201191E59020125
Wrapped command --> 84E8000CF70044321E181F8C00464131188C004E1F411009411108006F08116A848D0027191E1F8D004828041504670F8D004F28041504191E1F8B00501E1F4131191E5902012510736A08116A808D002718191E8C0044321E181F8C00464131191E5902012529051605100F53046A101605100F53056A08116A808D0027160510F05310206A11160510F05310106A08116A808D0027191E5902012529061504038B0042150416068B00511504191E16051F05438B00471E1F054341311E19926D19191E2510786B125902011504191E590201258B005270081504038B00521E19926D29191E25107A6B22590201191E59020125CD5DBEB3211E50EF
Response <-- 009000
Command --> 80E8000DEF076B0E1504191E8B0053590204700F116A808D0027700715048B00541504048B00427A03310332191E25107F6E08191E25327028191E2510816B0A191E044125327019191E2510826B0C191E04418D00403270081169848D00271F7802201D1100806D0404781D1100FF6E040578067804401F1100806D09191E1F5B3804781F1100FF6E11191E590201108138191E1F5B380578191E590201108238191E1F8D001E3B06780536198B00322E8D0055290416042907AD10048D004029081E16046D051E2907AD0F16081B0316078D002A3B1E16046F2C1E160443290616081604412908160431160616046F0C116100
Wrapped command --> 84E8000DF7076B0E1504191E8B0053590204700F116A808D0027700715048B00541504048B00427A03310332191E25107F6E08191E25327028191E2510816B0A191E044125327019191E2510826B0C191E04418D00403270081169848D00271F7802201D1100806D0404781D1100FF6E040578067804401F1100806D09191E1F5B3804781F1100FF6E11191E590201108138191E1F5B380578191E590201108238191E1F8D001E3B06780536198B00322E8D0055290416042907AD10048D004029081E16046D051E2907AD0F16081B0316078D002A3B1E16046F2C1E160443290616081604412908160431160616046F0C1161005DC43D63B2061E80
Response <-- 009000
Command --> 80E8000EEF160455290570171161001606552905700D0329080329061190002905AD100416088D001E3BAD100616068D001E3B19031E8B003516051190006A0716058D00277A080010000C000600010300030100020000000005015A00560200000A0200000B020000030200000402000005020000080200000902000001020000070200000D020000060200000C020000000200000202002A0002002A0102002A0402002A0502002A0602002A0202002A0305000002050000040500000A0300000D0100000006000001030000090682100006821003068210060682100203810B0403810B0503810B010300000A03810B030682
Wrapped command --> 84E8000EF7160455290570171161001606552905700D0329080329061190002905AD100416088D001E3BAD100616068D001E3B19031E8B003516051190006A0716058D00277A080010000C000600010300030100020000000005015A00560200000A0200000B020000030200000402000005020000080200000902000001020000070200000D020000060200000C020000000200000202002A0002002A0102002A0402002A0502002A0602002A0202002A0305000002050000040500000A0300000D0100000006000001030000090682100006821003068210060682100203810B0403810B0503810B010300000A03810B0306820FFD8B03AF234661
Response <-- 009000
Command --> 80E8000FEF03000682080D068207010500000606810E000682100106810B0003810E01068000000500000801002A00060004130382030303820A01050000000300000403820A0803820A060682100506000A7506000A120600074206000666060009CF060008130600068D060008E90682100406000C210300000E0682081206000B9F0300000C06000BD803000001060001A20300000B06000BEC03000003030000070300000606000A500600017A0300000503000002030000080300000F0300001006820A0109016600800A040707611C0404020B140B180505050904040B050605070809040C240C1527090C0C180D061420
Wrapped command --> 84E8000FF703000682080D068207010500000606810E000682100106810B0003810E01068000000500000801002A00060004130382030303820A01050000000300000403820A0803820A060682100506000A7506000A120600074206000666060009CF060008130600068D060008E90682100406000C210300000E0682081206000B9F0300000C06000BD803000001060001A20300000B06000BEC03000003030000070300000606000A500600017A0300000503000002030000080300000F0300001006820A0109016600800A040707611C0404020B140B180505050904040B050605070809040C240C1527090C0C180D061420D9257E72C8750564
Response <-- 009000
Command --> 80E80010EF18040F15040606060B080F0B5B04140502080F0502087708070508081404170A0807070202100A4F0E101709061E31129321162110230902080C29180A3F061336113105380905020508861A2D3D601C3B4663FFC410460900E20519080317160C0A0703040E070304140B540E2B0B070305030505070508081004050708142936190D0F14072007090522371A0F050A0D070A0F0A040514141111103F08070A08071304040604080408071306060405240B1B0C1D070505140C1A34090C090C090E090D0918090D0918090809090704080B0603080812060908070C0F15060E070E171A06070B171606070D160607
Wrapped command --> 84E80010F718040F15040606060B080F0B5B04140502080F0502087708070508081404170A0807070202100A4F0E101709061E31129321162110230902080C29180A3F061336113105380905020508861A2D3D601C3B4663FFC410460900E20519080317160C0A0703040E070304140B540E2B0B070305030505070508081004050708142936190D0F14072007090522371A0F050A0D070A0F0A040514141111103F08070A08071304040604080408071306060405240B1B0C1D070505140C1A34090C090C090E090D0918090D0918090809090704080B0603080812060908070C0F15060E070E171A06070B171606070D16060799F00E36A0DE524F
Response <-- 009000
Command --> 80E80011EF0D0916060817070A0B0C18070A161A180E0C091A0A0D070C190C0B221C241B08150D081E0607080C08080809210607061006090A14060720180E070C20081F0B07062F094809040C154309070C0B038D02000100000000130013000900000200BA010900000400BAFF0A00000600B4FF0A00000800B4FF0A00000A00B2000100000000BA010200000100B2020200000200B2030200000300B2040200000400B2050200000500B4060200000600B20702000007800408020000088003090200000980030A0200000A80040B0200000B80020C0200000C80040D0200000D80030081000100C20029000000000101002C
Wrapped command --> 84E80011F70D0916060817070A0B0C18070A161A180E0C091A0A0D070C190C0B221C241B08150D081E0607080C08080809210607061006090A14060720180E070C20081F0B07062F094809040C154309070C0B038D02000100000000130013000900000200BA010900000400BAFF0A00000600B4FF0A00000800B4FF0A00000A00B2000100000000BA010200000100B2020200000200B2030200000300B2040200000400B2050200000500B4060200000600B20702000007800408020000088003090200000980030A0200000A80040B0200000B80020C0200000C80040D0200000D80030081000100C20029000000000101002CC3F7B035877582EA
Response <-- 009000
Command --> 80E80012EF010400B200000000020100E0010D000500000000030100E700B8000300000000040100EC00B8000300000000050100F100D3001A000000000601010D00F8000E000000000701011D00AE00030000000008010122010D0026000000000901014A00C2002E000000000109017A00BA002600000000020901A20108002B000000000A0101CF00D60195000000000B01036600D60063000000000C0103CB00AE0006000000000D0103D300B00003000000000E0103D801000005000000000F0103DF010F0022000000001001040300C2000E000000000101002A0000080010FF1A00000000B20002002A0000B20102002A
Wrapped command --> 84E80012F7010400B200000000020100E0010D000500000000030100E700B8000300000000040100EC00B8000300000000050100F100D3001A000000000601010D00F8000E000000000701011D00AE00030000000008010122010D0026000000000901014A00C2002E000000000109017A00BA002600000000020901A20108002B000000000A0101CF00D60195000000000B01036600D60063000000000C0103CB00AE0006000000000D0103D300B00003000000000E0103D801000005000000000F0103DF010F0022000000001001040300C2000E000000000101002A0000080010FF1A00000000B20002002A0000B20102002AB2BC34AA2D9A1B6E
Response <-- 009000
Command --> 80E80013EF0100B20202002A0200BA0302002A0300BA0402002A0400B20502002A0500BE0602002A0600B20081041300C2004C000000000109046101120009000000000701046C011501F800000000FF02066600C2002500000000FF02068D00F500B300000000FF02074200EE00CF00000000FF02081300F200D400000000FF0208E900F200E400000000FF0209CF00F0004100000000FF020A1200EE003C00000000FF020A5000AE002300000000FF020A7500EE012800000000FF020B9F00F8003700000000FF020BD80102001200000000FF020BEC00CC003300000000FF020C2100FB008900000000005600AE00B000B200
Wrapped command --> 84E80013F70100B20202002A0200BA0302002A0300BA0402002A0400B20502002A0500BE0602002A0600B20081041300C2004C000000000109046101120009000000000701046C011501F800000000FF02066600C2002500000000FF02068D00F500B300000000FF02074200EE00CF00000000FF02081300F200D400000000FF0208E900F200E400000000FF0209CF00F0004100000000FF020A1200EE003C00000000FF020A5000AE002300000000FF020A7500EE012800000000FF020B9F00F8003700000000FF020BD80102001200000000FF020BEC00CC003300000000FF020C2100FB008900000000005600AE00B000B200A23F92CB9E7E5CEB
Response <-- 009000
Command --> 80E80014EFB200B400B800B800B200AE00B800B200AE00BA00B200B200B200B200BE00B200BA00BA00BA00BA00B200B0FFFF00C200C200C400C800CC00CF00C200D300D600D600B800C200DA00DD00B400DF00CF00E300D300C200B4FFFF00C200B000B200B200B800E800AE00EB00EE00EE00EE00C200F000F200F500F200F800FB010000C200F800AE01020104010800D600CC00B800AE00F800AE00BA00D3010D010D010F00C200AE0140012001B0056810B0013005600000056810E0011006B4B44305B4434004B44406B4B44404B44106B44B440343B002410636810E07326810B003441003334002B102B404B3B403BB40
Wrapped command --> 84E80014F7B200B400B800B800B200AE00B800B200AE00BA00B200B200B200B200BE00B200BA00BA00BA00BA00B200B0FFFF00C200C200C400C800CC00CF00C200D300D600D600B800C200DA00DD00B400DF00CF00E300D300C200B4FFFF00C200B000B200B200B800E800AE00EB00EE00EE00EE00C200F000F200F500F200F800FB010000C200F800AE01020104010800D600CC00B800AE00F800AE00BA00D3010D010D010F00C200AE0140012001B0056810B0013005600000056810E0011006B4B44305B4434004B44406B4B44404B44106B44B440343B002410636810E07326810B003441003334002B102B404B3B403BB40D92D172BF4715F96
Response <-- 009000
Command --> 80E880152103B440076820A4100221024405B4341008B4460000023103B41004B431066820A100
Wrapped command --> 84E880152903B440076820A4100221024405B4341008B4460000023103B41004B431066820A1BEEAE6412324393400
Response <-- 009000
Command --> 80E60C002107A000000527210108A00000052721010108A000000527210101010003C901000000
Wrapped command --> 84E60C002907A000000527210108A00000052721010108A000000527210101010003C901000002C30E58988EDD3C00
Response <-- 6985
install_for_install_and_make_selectable() returns 0x80206985 (6985: Command not allowed - Conditions of use not satisfied.)
jraynes commented 6 years ago

I tried to compile with the 2.1.2 SDK but that does not compile:

ant -DJAVACARD_HOME=c:\jc212
Buildfile: C:\Users\jraynes\Desktop\ykneo-oath-master\build.xml

init:

compile:

convert:
     [java]
     [java] warning: You did not supply export file for the previous minor version of the package
     [java] Java Card 2.1.2 Class File Converter (version 1.2)
     [java] Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved.
     [java] warning: Method <init> in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java]
     [java] warning: Method setKey in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] parsing C:\Users\jraynes\Desktop\ykneo-oath-master\applet\bin\pkgYkneoOath\OathObj.class
     [java] warning: Method setDigits in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] parsing C:\Users\jraynes\Desktop\ykneo-oath-master\applet\bin\pkgYkneoOath\YkneoOath.class
     [java] warning: Method getDigits in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method getType in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method setName in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method getName in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method getNameLength in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method setProp in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method addObject in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method getFreeObject in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method findObject in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method calculate in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method calculateTruncated in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method getDigestLength in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method isActive in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method setActive in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method setImf in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method clearImf in class pkgYkneoOath.OathObj contains local variables, but not local variable table.
     [java] warning: Method <init> in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method install in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method process in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handleReset in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handleValidate in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handleChangeCode in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handleCalc in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handleCalcAll in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handleList in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handleDelete in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method calculateTotalLen in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method handlePut in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method getLength in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method getLengthBytes in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] warning: Method setLength in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java] converting pkgYkneoOath.OathObj
     [java] warning: Method sendData in class pkgYkneoOath.YkneoOath contains local variables, but not local variable table.
     [java]
     [java] conversion completed with 1 errors and 36 warnings.
     [java] error: export file lang.exp of package java.lang not found.

BUILD FAILED
klali commented 6 years ago

Make sure you have a card with enough RAM available, this applet requires a bit over 2k of RAM available for transient use. Depending on other applets installed and how their RAM usage is defined this might give you this kind of issues.

For building this requires javacard 2.2.

trknz commented 6 years ago

I've compiled and installed the applet on the javacard but then the Yubico Authenticator desktop does not recognise the card producing an error "No YubiKey deleted"

Aiosa commented 4 years ago

Yeah, neither for me, because the AID of the applet is wrong. I traced the desktop app and it sends select commands:

00 A4 04 00 07 A0 00 00 05 27 20 01 //this one is used in ykotp applet https://github.com/arekinath/YkOtpApplet 00 A4 04 00 08 A0 00 00 05 27 47 11 17

but from the build file, the applet is compiled using

  <property name="PACKAGE_AID" value="0xa0:0x00:0x00:0x05:0x27:0x21:0x01"/>  
  <property name="APPLET_AID" value="0xa0:0x00:0x00:0x05:0x27:0x21:0x01:0x01"/>
Aiosa commented 4 years ago

I tried to go with the second AID, did not get far though

00 A4 04 00 08 A0 00 00 05 27 47 11 17 79 03 01 00 02 71 ... 90 00 //select ok, version 1.0.2 00 1D 00 00 00 6D 00 //Instruction code not supported or invalid

With android app, I got an error: OATH functionality missing or disabled. Seems to work with yubikeys only then...

imakhalova commented 4 years ago

'APPLET_AID' with value '0xa0:0x00:0x00:0x05:0x27:0x21:0x01:0x01' is correct AID for OATH. Does Android Authenticator provides you an error if you have correct AID?

Aiosa commented 4 years ago
Well, I tried all the three AID versions with the following results (APDU tracer): **A0 00 00 05 27 20 01** Desktop authenticator: > 00 A4 04 00 07 A0 00 00 05 27 20 01 > 79 03 01 00 02 71 08 AF 4F C6 D4 4F A4 42 61 90 00 selection succesfull, but the app did not try to send any other commands Android app: NFC: got toast message similar to "card OATH functionality missing or disabled" **A0 00 00 05 27 47 11 17** Desktop authenticator: > 00 A4 04 00 08 A0 00 00 05 27 47 11 17 > 79 03 01 00 02 71 08 3C ED 63 0F 3E 47 D0 A8 90 00 > 00 1D 00 00 00 > 6D 00 select succesful, but the second command was not recognized by applet Android app: same as above **A0 00 00 05 27 21 01 01** (the project-default) Desktop authenticator: > 00 A4 04 00 07 A0 00 00 05 27 20 01 > 6A 82 (file not found) > 00 A4 04 00 08 A0 00 00 05 27 47 11 17 > 6A 82 (file not found) asks for different AIDs Android app: did not even notice the card being processed In all the cases, all the apps said "device not found". Tried even older versions of the desktop app with same /or worse/ results. Was using NXP JCOP3 J3H145 with sdk support up to 3.0.4 over Gemalto reader Of course there is also possibility that there are other sellect commands that are not sent because I am not using yubikey - and thus other communications may end at USB protocol level... For android app, I did not try to search for any logs yet and I don't have access to the phone now,(mine does not support nfc) can have look in a few days again if there is more info available.
imakhalova commented 4 years ago

File not found errors are for other applets of YubiKey that are not part of this project. Overall Authenticator apps shouldn't much care about other than OATH applets (they provide additional information about YubiKey like what interfaces supported/enabled on the key, what type of key is that, etc). Checking Android version code and it doesn't use other applets. Hard to tell without any related to issue logs what happens. And please create your own issue as it's not related to topic starter.

Aiosa commented 4 years ago

Sorry, I was misled by @vlsinitsyn who seems to be having exactly the same issue, so I joined. Will create one once I can debug the android.