1 2 Previous Next 23 Replies Latest reply: Jul 18, 2012 11:24 PM by safarmer Go to original post RSS
      • 15. Re: error 6985 after a succesful mutual authentification
        816119
        >
        -->25: 80E602001407F234123456100008A000000018434D00000000
        <--2: 6985>

        >
        -->25: 80E602001407F234123456100008A000000018434D00000000
        <--3: 009000
        >

        ?


        C4C8
        i think this is incorrect. length C8 must be coded with 2 bytes 81C8.

        and i am not sure about "C42893". What is this?
        is 200 size of all data to download?
        • 16. Re: error 6985 after a succesful mutual authentification
          941427
          80E80000CAC4C8C42893010016DECAFFED020204000107F2341234561000047465737402002100160021000B003200FA000E0690001E00E60000021F0F7E002C0002000C05010004003205030107A0000000620101000107A0000000620001030107A0000000620102030107A0000000620201000106A0000001510003000B0107F2341234561001018306000E000000800303000307010000019707069007022B803B02680038030300100315003C02D48049031F0038034000100352003C03298031035C0038037D0010038F003C00

          This is what i send for the load command

          CA is the length of data field C4 is the tag c8 is its lentgh and the rest is the value
          • 17. Re: error 6985 after a succesful mutual authentification
            816119
            there are some rules for length coding of TLV objects. if length >128 it must be coded with two/more bytes. for C4 it must be 81C4 or 8200C4.

            Edited by: 666 on 19.06.2012 5:55
            • 18. Re: error 6985 after a succesful mutual authentification
              941427
              Hi,

              now i can load almost the halfo of the applet because for the second half it return 6985 !!!

              Install for Load
              -->25: 80E602001407F234123456100008A000000018434D00000000
              <--3: 009000
              Load CAP
              Block max_size :239
              Number of blocks :27
              -->249: 80E80000F3C4820B4D010016DECAFFED020204000107F2341234561000047465737402002100160021000B003200FA000E0690001E00E60000021F0F7E002C0002000C05010004003205030107A0000000620101000107A0000000620001030107A0000000620102030107A0000000620201000106A0000001510003000B0107F2341234561001018306000E000000800303000307010000019707069007022B803B02680038030300100315003C02D48049031F0038034000100352003C03298031035C0038037D0010038F003C03668031039900380510188C0010112EE0900B7F00141066900B7F0018100C900B7F001A1014900B7F0000
              block 0: <--3: 009000
              Loading...Block 1 sent...
              -->249: 80E80001EF06100C900B7F002D06900B7F003406900B7F000806900B7F002707900B7F001506900B7F002308900B7F000408900B7F000A1016900B7F00201016900B7F001C1020900B7F0030100D900B7F0029100A900B7F00261810129100078702AD02047B001437AD02057B001837AD02067B001A37AD02077B000637AD02087B002D37AD0210067B003437AD0210077B000837AD0210087B002737AD0210097B001537AD02100A7B002337AD02100B7B000437AD02100C7B000A37AD02100D7B002037AD02100E7B001C37AD02100F7B003037AD0210107B002937AD0210117B00263703058D002F7F001F110082900B7F00900B7F0000
              <--3: 009000
              Loading...Block 2 sent...
              -->249: 80E80002EF1F188F00253D06078C00368700AD007B002C03078B001B18061040038D0039940000178701AD017B000D038E0300170504038D00037F002B7A05308F003A3D8C000C181D0441181D258B00097A0323188B003260037A198B00222D1A0425328D003128041F750073000AFF82005EFF880050FFA4002DFFB00034FFD6003BFFDA0042FFE60065FFE8006C002000490050005718198C001D704718198C003B704018198C003B703918198C0037703218198C0016702B18198C000E7024181915048C0012181915048C0021181915048C0024181915048C002A116D008D003D7A0432198B00283B198B00222E1B052561900B7F0000
              <--3: 009000
              Loading...Block 3 sent...
              -->249: 80E80003EF071B06256008116B008D003D1B07251100FF532904160410086A081167008D003D19081A198E02000F008B001170092E116F008D003D7A0623198B00283B198B00222D1008900B2E1A052561071A06256008116B008D003D1A07251100FF532904160410086A081167008D003D7B002BAD01058B001E1A081B0316048D00333B7B002B1B0316041A038B002E3B04810013190316048B00117A0333198B00283B198B00222E1B052561071B06256008116B008D003D1B07251100FF532904160410106A081167008D003D1A198E02000F002905190816058B0011701328051163008D003D70092E1169858D003D7A03900B7F0000
              <--3: 009000
              Loading...Block 4 sent...
              -->249: 80E80004EF32198B00283B198B00222E1B032510846A08116E008D003D1A198E02000F002904190816048B0011701328041163008D003D70092E1169858D003D7A0332198B00283B198B00222E1B032510846A08116E008D003D1A198E02000F002904190816048B0011701328041163008D003D70092E1169858D003D7A0423198B00283B198B00222D1A05256008116B008D003D1A07251100FF53321A0625046B281F076A081167008D003DAD001A08078B0035611AAD008B001929041163C01604418D003D7008116B008D003D1190008D003D7A0423198B00283B198B00222D1A06251100FF53320329041A07251100FF53900B7F0000
              <--3: 009000
              Loading...Block 5 sent...
              -->249: 80E80005EF29041A05256008116B008D003D1A062510406C081A0625026D08116B008D003D1F73002B004100410009AD008B000B61081169828D003D1604076A081167008D003DAD001A08078B001B7008116A888D003D7A0523198B00222D03321A058D000529047B001F6708116A828D003D1604118000531180006B08116A868D003D16047B001F926C08116A868D003D1A07251100FF53321F61097B001F9232701216041F417B001F926F081167008D003D7B001FAD020624940B00006805047003037B001FAD020724940B000068050470030353600FAD008B000B61081169828D003D7B001FAD020724940B000069147D900B7F0000
              <--3: 009000
              Loading...Block 6 sent...
              -->249: 80E80006EF0013046B080381001370081169828D003D7B001F16041A031F8D00333B19031F8B00117A0224198B00283B198B00222D03321A058D0005290416041102006A08116A868D003D1A0725321F056A081167008D003D1A088D000529051605730126D001D017003500430051005F006D007B008A009900A801260126012601260126012600B600C400D200E000EE00FC010A0118AD020424940B00007F001FA800ECAD020524940B00007F001FA800DEAD020624940B00007F001FA800D0AD020724940B00007F001FA800C2AD020824940B00007F001FA800B4AD02100624940B00007F001FA800A5AD02100724940B00900B7F0000
              <--3: 009000
              Loading...Block 7 sent...
              -->249: 80E80007EF007F001FA80096AD02100824940B00007F001FA80087AD02100924940B00007F001F7078AD02100A24940B00007F001F706AAD02100B24940B00007F001F705CAD02100C24940B00007F001F704EAD02100D24940B00007F001F7040AD02100E24940B00007F001F7032AD02100F24940B00007F001F7024AD02101024940B00007F001F7016AD02101124940B00007F001F7008116A828D003D7A08001E002C001500020300040000000003000801020304050403020000000200000500FA003E0200020102000202020002000683010005000018068010040500000A0181000005000010038003020500001A0380900B7F0000
              <--3: 009000
              Loading...Block 8 sent...
              -->249: 80E80008EF0904060000390500000206000270018402000680030003800A08060002290500002A0500000405000014060003A101820A00050000060380090205000008038009080500001E0600052A03830103050000260500001C060002D203800A01050000160600032701800900050000240500001203800A06050000220600036405000028050000000500000C038301010680080D050000200684030403800303068010020500000E0380090106800900060003F901810A0006820D00010002000600046A01800500068007010900E60032B7020707070707080808080808080808080822021602FF3BFF280A6718701111900B7F0000
              <--3: 009000
              Loading...Block 9 sent...
              -->249: 80E80009EF109D0E0E0E0E0E0F0F0F0E0E0E0E0E0E0E0E00B0070808080808080608070707070606060606060607070707070608070707070808080808080808080808080603080406070508040705060306040A070708350707070707090707070607051115080409070516150306090409050707051115060A0A0907050E060A0A0907050E060A0A0907050C1808070B0806070520130F080B0808070805081105090E0B0903111608030D07080308070705080F0E05440E0E0E0E0F0F0F0F0E0E0E0E0E0E0E0E080C0F7E00610009746573742F5465737400196A617661636172642F6672616D65776F726B2F4170706C6574900B7F0000
              <--2: 6985
              Loading...Block 10 sent...
              -->249: 80E8000AEF0009546573742E6A617661000A434C415F49534F5F3030000142000A434C415F49534F5F3930000A434C415F49534F5F3830000A434C415F49534F5F3834000A494E535F49534F5F4134000A494E535F49534F5F4230000A494E535F49534F5F4436000A494E535F49534F5F4441000A494E535F49534F5F3230000A494E535F49534F5F3838000A494E535F49534F5F3530000A494E535F49534F5F3832000A494E535F49534F5F4536000A494E535F49534F5F4538001153575F444154415F4E4F545F464F554E44000153000D53575F50494E5F4641494C4544001A53575F415554485F484F53545F4352595054900B7F0000
              <--2: 6985
              Loading...Block 11 sent...
              -->249: 80E8000BEF4F5F4641494C4544000B5441475F5553455250494E000570686F746F00025B42000761646472657373000669645F6C6962000769645F6374726C00056372735F3100056372735F3200056D616A6F720008736F635F73746174000561635F797200076973735F756E6900086973735F6461746500086578705F6461746500046578616D00046E616D6500077375726E616D650003494E45000D53747564656E744E756D626572000466696C6500135B4C6A6176612F6C616E672F4F626A6563743B000D72616D5F776F726B6172726179000F44454641554C545F5553455250494E000C5553455250494E5F53495A45900B7F0000
              <--2: 6985
              Loading...Block 12 sent...
              -->249: 80E8000CEF000B5553455250494E5F434E54000A5553455250494E5F494400077573657270696E001D4C6A617661636172642F6672616D65776F726B2F4F776E657250494E3B0007617574686B6579001A4C6A617661636172642F73656375726974792F4445534B65793B000963697068657243424300194C6A61766163617264782F63727970746F2F4369706865723B0008617574685F666C67000B44454641554C545F4B455900063C696E69743E0003282956000474686973000B4C746573742F546573743B0007696E7374616C6C0007285B425342295600066241727261790007624F66667365740007624C656E677468900B7F0000
              <--2: 6985
              Loading...Block 13 sent...
              -->249: 80E8000DEF000770726F63657373001C284C6A617661636172642F6672616D65776F726B2F415044553B295600046170647500194C6A617661636172642F6672616D65776F726B2F415044553B00036275660003696E730002736300224C6F72672F676C6F62616C706C6174666F726D2F5365637572654368616E6E656C3B0011494E495449414C495A455F555044415445003E284C6A617661636172642F6672616D65776F726B2F415044553B4C6F72672F676C6F62616C706C6174666F726D2F5365637572654368616E6E656C3B2956000662756666657200086C656E5F64617461000165001D4C6A6176612F6C616E672F900B7F0000
              <--2: 6985
              Loading...Block 14 sent...
              -->249: 80E8000EEF5365637572697479457863657074696F6E3B0015494E5445524E414C5F41555448454E544943415445000872616D5F74656D70001745585445524E414C5F41555448454E544946494341544500066C656E677468000363726500294C6A617661636172642F6672616D65776F726B2F4361726452756E74696D65457863657074696F6E3B0007494E5354414C4C00044C4F414400065645524946590005747269657300085055545F444154410003746167000B524541445F42494E415259000876616C5F70317032000B53454C4543545F46494C4500076669645F6C656E00086669645F74656D7000047465737400900B7F0000
              <--2: 6985
              Loading...Block 15 sent...
              -->249: 80E8000FEF6000010000000100020001000200002E000C00030004001900000000000500040019FFFFFF90000600040019FFFFFF80000700040019FFFFFF84000800040019FFFFFFA4000900040019FFFFFFB0000A00040019FFFFFFD6000B00040019FFFFFFDA000C0004001900000020000D00040019FFFFFF88000E0004001900000050000F00040019FFFFFF82001000040019FFFFFFE6001100040019FFFFFFE800120013001900006A88001400130019000063C0001500130019000063000016001300190000004100170018000A0000000400190018000A00000006001A0018000A00000008001B0018000A0000000A00900B7F0000
              <--2: 6985
              Loading...Block 16 sent...
              -->249: 80E80010EF1C0018000A0000000C001D0018000A0000000E001E0018000A00000010001F0018000A0000001200200018000A0000001400210018000A0000001600220018000A0000001800230018000A0000001A00240018000A0000001C00250018000A0000001E00260018000A0000002000270018000A0000002200280018000A000000240029002A000200000000002B0018000A00000026002C0018001900000000002D0004001900000004002E0004001900000003002F0004001900000001003000310002000000010032003300020000000200340035000A0000002800360013000A0000002A00370018001A00000002900B7F0000
              <--2: 6985
              Loading...Block 17 sent...
              -->249: 80E80011EF00380039000200390201480001003000003A003B000001480000000300DD0004000B00DF000C001200E00013001900E2001A002000E30021002700E40028002D00E5002E003300E60034003900E7003A003F00E80040004500E90046004B00EA004C005100EB0052005800EC0059005F00ED0060006600EE0067006D00EF006E007400F00075007C00F3007D008300F40084008A00F5008B009100F60092009800F70099009F00F800A000A700F900A800AF00FA00B000B700FB00B800BF00FC00C000C700FD00C800CF00FE00D000D700FF00D800DF010000E000E7010100E800EF010200F000F7010300F800FF01900B7F0000
              <--2: 6985
              Loading...Block 18 sent...
              -->249: 80E80012EF040100010001070101010101080102010701070108010F010A0110011B010D011C012501100126012701140128013101150132013301140134013E0117013F0146011A01470147011B003C003D000901830200120003000400003E00180000001201003F0013000000120200400004000000120000000A011E000B000D011F000E0010011E00110011012100410042000101970200900005001800003A003B000000900100430044000000900200450018000C008403004600040010008004004700480015007B0000000501260006000601290007000B012C000C000F012E00100014013100150042013400430047900B7F0000
              <--2: 6985
              Loading...Block 19 sent...
              -->249: 80E80013EF0138004800490139004A004E013B004F0050013C00510055013E00560057013F0058005C0141005D005E0142005F006301440064006501450066006A0147006B006C0148006D0073014A0074007A014C007B0081014E0082008801500089008E0156008F008F015A0049004A000202290200450006000C00003A003B0000004501004300440000004502004700480000004503004B0018000A003304004C00130023001A03004D004E003E0006000000040160000500090161000A000E0163000F00130164001400190165001A0022016900230028016B0029002E016D002F003C0171003D003D0173003E00430175900B7F0000
              <--2: 6985
              Loading...Block 20 sent...
              -->249: 80E80014EF004400440179004F0042000202700200600005001100003A003B0000006001004300440000006002004B0018000A00560300500018000F005104004C00130028003800000004017C00050009017D000A000E017F000F001301820014001801830019001E0184001F002701870028002D0189002E0033018B0034003C018F003D003F01900040004201910043004601900047005301920054005701940058005E0197005F005F019A0051004A000202D20200530008000F00003A003B0000005301004300440000005302004700480000005303004B0018000A004104004C0013002300280500520013003800090500900B7F0000
              <--2: 6985
              Loading...Block 21 sent...
              -->249: 80E80015EF5300540043000603004D004E004C00060000000401A00005000901A1000A000E01A3000F001301A40014001901A6001A002201AA0023002801AC0029002E01AE002F003701B40038004001B70041004201B90043004A01BB004B004B01BE004C005101C00052005201C30055004A0002032702003B0007000B00003A003B0000003B01004300440000003B02004700480000003B03004B0018000A00290400520013002000090400530054002B000603004D004E003400060000000401CA0005000901CB000A001001CD0011001601CF0017001F01D50020002801D80029002A01DA002B003201DC0033003301DF00900B7F0000
              <--2: 6985
              Loading...Block 22 sent...
              -->249: 80E80016EF34003901E1003A003A01E30056004A0002036402003B0007000B00003A003B0000003B01004300440000003B02004700480000003B03004B0018000A00290400520013002000090400530054002B000603004D004E003400060000000401EC0005000901ED000A001001EF0011001601F10017001F01F80020002801FB0029002A01FD002B003201FF003300330202003400390204003A003A020600570042000203A10200560005000E00003A003B0000005601004300440000005602004B0018000A004C03004C0013001D00390400580013003E000900000004020B00050009020C000A000E020F000F00140210900B7F0000
              <--2: 6985
              Loading...Block 23 sent...
              -->249: 80E80017EF0015001C0214001D002202160023002602170027002C0219002D0036021B0037003D021C003E0048021D0049004E0226004F0054022900550055022C00590042000203F902006F0005001500003A003B0000006F01004300440000006F02004B0018000A006503005A00130012005D04004C00130015005A000000040230000500090231000A001102340012001402350015001D0237001E0022023A00230028023B0029002F023F0030003502400036003B0241003C0045024C0046004C024F004D005202500053005702520058005D0253005E006102560062006202570063006502560066006702580068006D02900B7F0000
              <--2: 6985
              Loading...Block 24 sent...
              -->249: 80E80018EF5B006E006E025E005B00420002046A0200BE0005001B00003A003B000000BE0100430044000000BE02004B0018000500B903004C0013000700B704005C0013000E00B00000000402620005000602640007000D0265000E0012026700130018026800190023026B00240029026D002A003102700032003702710038003F027400400042027800430049027A004A0053027E00540059027F005A006A0282006B007E0283007F008502870086008B0288008C0098028E0099009E0290009F00A4029200A500AA029400AB00B1029900B200B2029A00B300B6029900B700BC029B00BD00BD029D005D00420002052A0201900B7F0000
              <--2: 6985
              Loading...Block 25 sent...
              -->249: 80E80019EF640006002F00003A003B0000016401004300440000016402004B0018000A015A03005E0013000C015804005C00130013015105005F00130035012F0000000402A10005000902A2000A000B02A4000C001202A60013001902A9001A001F02AA0020002302AC0024002702AF0028002D02B0002E003402B30035006B02B5006C007602B70077007902B8007A008402BA0085008702BB0088009202BD0093009502BE009600A002C000A100A302C100A400AE02C300AF00B102C400B200BD02C600BE00C002C700C100CC02C900CD00CF02CA00D000DB02CC00DC00DE02CD00DF00EA02CF00EB00EC02D000ED00F802D2900B7F0000
              <--2: 6985
              ->34: 84E60C001D07F234123456100007F234123456100107F2341234561001010002C900
              <-2: 6985
              Could not load applet.



              i can't understand the problem!!
              • 19. Re: error 6985 after a succesful mutual authentification
                816119
                check that commands are correct
                some things look strange
                Block max_size :239
                but you send blocks of 249 bytes
                Number of blocks :27
                but size of tag C4 is 0B4D, it is not 27 blocks of 239/246 bytes
                • 20. Re: error 6985 after a succesful mutual authentification
                  941427
                  here is the method that divide the capfile into blocks but i don't know why it return 27 block instead of 13

                       public Vector get()
                       {
                       
                            Vector<byte[]> vec = new Vector<byte[]>();
                            byte[] buf = new byte[_maxSize];
                            byte[] bufRead = new byte[_maxSize];
                            int index = 0;
                            int sizeLast = 0;
                            for (int indexComponent = 0 ; indexComponent < _caps.length ; indexComponent ++)
                            if (_caps[indexComponent] != null)
                                 
                            for (int i = 0 ; i < _caps[indexComponent].size() ; i++)
                            {
                            
                            bufRead = ((byte[])(_caps[indexComponent].elementAt(i)));
                            int indexFin = index + bufRead.length;
                            for (int j = index ; j < indexFin ; j++)
                            {
                            buf[j%_maxSize] = bufRead[j-index];
                            sizeLast ++;
                            if (j == _maxSize - 1)
                            {
                            vec.add(buf);
                            buf = new byte[_maxSize];
                                 sizeLast = 0;
                            }
                            }
                            index = indexFin % _maxSize;
                            }
                            if (sizeLast != 0)
                            {
                            byte[] buf2 = new byte[sizeLast];
                            for (int i = 0 ; i < sizeLast ; i++)
                                 buf2[i] = buf;
                            vec.add(buf2);
                            }
                            return vec;
                       }
                  • 21. Re: error 6985 after a succesful mutual authentification
                    816119
                    actually that can be correct. JCOP cards let to download some additional data, debug information from cap file. But i do not know if this is gemalto case.

                    try to load applet with GPShell and compare loaded data.
                    • 22. Re: error 6985 after a succesful mutual authentification
                      safarmer
                      Rpost with &#123;code} tags
                      938424 wrote:
                             public Vector get()
                             {
                           
                                  Vector<byte[]> vec = new Vector<byte[]>();
                                    byte[] buf = new byte[_maxSize];
                                    byte[] bufRead = new byte[_maxSize];
                                    int index = 0;
                                    int sizeLast = 0;
                                    for (int indexComponent = 0 ; indexComponent < _caps.length ; indexComponent ++)
                                      if (_caps[indexComponent] != null)
                                           
                                        for (int i = 0 ; i < _caps[indexComponent].size() ; i++)
                                        {
                                          
                                          bufRead = ((byte[])(_caps[indexComponent].elementAt(i)));
                                          int indexFin = index + bufRead.length;
                                          for (int j = index ; j < indexFin ; j++)
                                          {
                                            buf[j%_maxSize] = bufRead[j-index];
                                            sizeLast ++;
                                            if (j == _maxSize - 1)
                                            {
                                              vec.add(buf);
                                              buf = new byte[_maxSize];
                                           sizeLast = 0;
                                            }
                                          }
                                          index = indexFin % _maxSize;
                                        }
                                    if (sizeLast != 0)
                                    {
                                      byte[] buf2 = new byte[sizeLast];
                                      for (int i = 0 ; i < sizeLast ; i++)
                                     buf2[i] = buf;
                                vec.add(buf2);
                                }
                                return vec;
                           }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                      • 23. Re: error 6985 after a succesful mutual authentification
                        safarmer
                        666 wrote:
                        actually that can be correct. JCOP cards let to download some additional data, debug information from cap file. But i do not know if this is gemalto case.

                        try to load applet with GPShell and compare loaded data.
                        You can also try loading each component one at a time. This can help show why it is failing as you can see which component you are sending. Also, you may need to include more of your code to see where the issues are.

                        Shane
                        1 2 Previous Next