1 2 Previous Next 23 Replies Latest reply: Jul 18, 2012 11:24 PM by safarmer RSS

    error 6985 after a succesful mutual authentification

    941427
      Hi

      i'm trying to load .cap file into java card after a successful mutual autentification but i get 6985 !!!



      EXTERNAL AUTHENTIFICATE command--> 22: 8482000010967DF780A70A99FEEC395CBAF070350F00
      <-- 2: 9000
      **************************
      Succesful authentification
      **************************


      ************
      UplaodCAP
      *************
      Get AID from header.cap file
      CAP AID :7: F2341234561000
      Applet AID :7: F2341234561001
      Loading cap file. Please wait...
      Install for Load
      -->25: 84E602001407F234123456100008A000000018434D00000000
      <--2: 6985
      Load CAP
      block 0: 2: 6985
      Could not load applet.


      Can anybody help!

      thankx
        • 1. Re: error 6985 after a succesful mutual authentification
          Sebastien_Lorquet
          disappointing, huh? I understand.

          check the package is not already there and (if your sd is not the isd) that the security domain you're talking to supports card management.

          regards
          • 2. Re: error 6985 after a succesful mutual authentification
            941427
            Hi,

            the security domain is the gemalto AID: A000000018434D0

            what do you mean by isd ?
            • 3. Re: error 6985 after a succesful mutual authentification
              941427
              Hi again,

              i'm stack with this error (6985), i tried to do a MAC for this command khnowung that i have a succesful authentification , but i still have this error in the command install for load :


              here is the whole comman for INSTALL for load with the mac

              84E60200 1C 07 F2341234561000 08 A000000018434D00 000000 DF8FEB471C7ED00F

              F2341234561000:CAP AID
              A000000018434D00: security domain AID(gemalto)
              DF8FEB471C7ED00F: MAC

              thankx for helping me!!
              • 4. Re: error 6985 after a succesful mutual authentification
                941427
                Hi,

                i'm still trying to upload my applet in javacard but i get 6A80 in delete command an install for load , i'am appling a MAC to the command apdu because i used to have 6985 ,

                but for 6A80 i can't get it here is my execution:

                Get AID from header.cap file
                CAP AID :7: F2341234561000

                Applet AID :7: F2341234561001

                Loading cap file. Please wait...

                delete
                MAC:8: 5C69D8C8AE5195F0
                -->22: 80E40000114F07F23412345610005C69D8C8AE5195F0
                <--2: 6A80

                Install for Load
                MAC:8: B7DE2263098EA766
                -->33: 80E602001C07F234123456100008A000000018434D00000000B7DE2263098EA766
                <--2: 6A80

                Load CAP
                block 0: 2: 6985
                • 5. Re: error 6985 after a succesful mutual authentification
                  816119
                  84E602001407F234123456100008A000000018434D00000000
                  check if this is correct. It seems that aid A000000018434D 7 byte length. So correct apdu 84E6020013 07F2341234561000 07A000000018434D 000000 00.

                  Edited by: 666 on 18.06.2012 5:01
                  • 6. Re: error 6985 after a succesful mutual authentification
                    941427
                    but the card manager AID for gemalto is A000000018434D00 so its length is 08 and for the rest it's the parameter field for install for load command
                    • 7. Re: error 6985 after a succesful mutual authentification
                      816119
                      maybe you need to send apdu with class 0x80
                      • 8. Re: error 6985 after a succesful mutual authentification
                        941427
                        when i use 84 it return 6985 :

                        84E602001E07F234123456100008A000000018434D0000818081805F5B9457C119B73D
                        <--2: 6985
                        • 9. Re: error 6985 after a succesful mutual authentification
                          941427
                          when i send a install for load :

                          80E60200 1C 07 F2341234561000 08 A000000018434D00 000000 35998562FB2BD2C2

                          F2341234561000 : CAP AID
                          A000000018434D00: card manager AID
                          00:length of lload file data block hash
                          00: length of load parameter field
                          00:length of load token

                          conforming to global platform
                          • 10. Re: error 6985 after a succesful mutual authentification
                            816119
                            class 0x84 means that command with secure messaging
                            class 0x80 means plain apdu
                            try "80E60200 14 07 F2341234561000 08 A000000018434D00 000000" i.e. plain apdu without mac.
                            • 11. Re: error 6985 after a succesful mutual authentification
                              941427
                              yes but when i use CLA=80 with no wecure message it returnn 6985 !!!!

                              Please help!!
                              • 12. Re: error 6985 after a succesful mutual authentification
                                941427
                                ************
                                UplaodCAP
                                *************
                                Get AID from header.cap file
                                CAP AID :7: F2341234561000
                                Applet AID :7: F2341234561001
                                Loading cap file. Please wait...
                                delete
                                -->14: 80E40000094F07F2341234561000
                                <--2: 6985
                                Install for Load
                                -->25: 80E602001407F234123456100008A000000018434D00000000
                                <--2: 6985
                                Load CAP
                                200: C42893010016DECAFFED020204000107F2341234561000047465737402002100160021000B003200FA000E0690001E00E60000021F0F7E002C0002000C05010004003205030107A0000000620101000107A0000000620001030107A0000000620102030107A0000000620201000106A0000001510003000B0107F2341234561001018306000E000000800303000307010000019707069007022B803B02680038030300100315003C02D48049031F0038034000100352003C03298031035C0038037D0010038F003C
                                block 0: 2: 6985
                                MAC:8: 20FD79C48EDA5E23
                                Could not load applet.
                                apres run


                                what is the problem please help!

                                thankx
                                • 13. Re: error 6985 after a succesful mutual authentification
                                  816119
                                  maybe you also need encryption
                                  try to load applet with GPShell with different security mode clear/mac/enc+mac
                                  • 14. Re: error 6985 after a succesful mutual authentification
                                    941427
                                    Hi,

                                    i khow that my problem is not encyption because i'm workin with cl=80 and it work for delete and install for load but for the command load it fail :

                                    Install for Load
                                    -->25: 80E602001407F234123456100008A000000018434D00000000
                                    <--3: 009000
                                    Load CAP
                                    200: C42893010016DECAFFED020204000107F2341234561000047465737402002100160021000B003200FA000E0690001E00E60000021F0F7E002C0002000C05010004003205030107A0000000620101000107A0000000620001030107A0000000620102030107A0000000620201000106A0000001510003000B0107F2341234561001018306000E000000800303000307010000019707069007022B803B02680038030300100315003C02D48049031F0038034000100352003C03298031035C0038037D0010038F003C
                                    202
                                    data field202: C4C8C42893010016DECAFFED020204000107F2341234561000047465737402002100160021000B003200FA000E0690001E00E60000021F0F7E002C0002000C05010004003205030107A0000000620101000107A0000000620001030107A0000000620102030107A0000000620201000106A0000001510003000B0107F2341234561001018306000E000000800303000307010000019707069007022B803B02680038030300100315003C02D48049031F0038034000100352003C03298031035C0038037D0010038F003C
                                    -->208: 80E80000CAC4C8C42893010016DECAFFED020204000107F2341234561000047465737402002100160021000B003200FA000E0690001E00E60000021F0F7E002C0002000C05010004003205030107A0000000620101000107A0000000620001030107A0000000620102030107A0000000620201000106A0000001510003000B0107F2341234561001018306000E000000800303000307010000019707069007022B803B02680038030300100315003C02D48049031F0038034000100352003C03298031035C0038037D0010038F003C00
                                    block 0: 2: 6A80
                                    Could not load applet.

                                    you can see the load block with 200 byte the data field and the command LOAD but i can't understand why it sad there is problem in UDR

                                    Help!!
                                    1 2 Previous Next