From: Matthias D. <mat...@pl...> - 2010-01-22 09:21:37
|
Hallo Karsten, with some help of a C programmer I've found the mistake in my program. He knew about the ERROR_INSUFFICIENT_BUFFER 122 (0x7A) - my buffer was just to small! Just don't know why it worked on JCOP V2.2, but finally we can state the problem as solved. Thank you for your assistance. PS: GPShell: yes, that was working, just a bit slower but we used it for production until we've found the error. Mit freundlichen Grüßen Matthias Daszenies <mailto: mat...@pl...> Direkt: ++49 / 351 / 422 78-29 --- Plasticard-ZFT GmbH Reisewitzer Str. 82 01159 Dresden <http://www.plasticard.de> Fon: ++49 / 351 / 422 78-0 Fax: ++49 / 351 / 422 78-51 Plasticard-ZFT GmbH Geschäftsführer: Jürgen Werner, Frank Hertel Sitz der Gesellschaft: Dresden Registergericht Dresden: HRB 2433 Ust-ID Nr.: DE 140 130 815 --- Karsten Ohme schrieb: > Hi Matthias, > > > Matthias Daszenies schrieb: > >> <https://sourceforge.net/mailarchive/forum.php?thread_name=848281.19007.qm%40web76905.mail.sg1.yahoo.com&forum_name=globalplatform-users>Hi >> Karsten, >> >> I am setting up JCOP (21/36 V2.3.1) Cards for an ID Application. >> >> After booting we set the ISD Keys, install the security domain and set >> the SSD Keys. (pls. see script below) >> >> We created the setup using JCShell, this worked fine but slowly, so we >> rebuild the process into an own application using Delphi and the >> "GlobalPlatform.dll" (unfortunately from Delphi I have no chance to use >> the traceMode :'( ) >> >> > Can cannot call the enableTrace function? Why? > > Well, you can enable logging output: > > I quote from the README of GP library: > > If you experience problems a DEBUG output is always helpful. > Set the variable GLOBALPLATFORM_DEBUG=1 in the environment. You can set > the logfile with GLOBALPLATFORM_LOGFILE=<file>. Under Windows by > default C:\Temp\GlobalPlatform.log is chosen. The log file must be > writable for the user. The default log file under Unix systems is > /tmp/GlobalPlatform.log. But usually syslog is available and this will > be used by default, so you may have to specify the log file manually, > if you don't have access to the syslog or don't want to use it. > Keep in mind that the debugging output may contain sensitive information, > e.g. keys! > > So the library logs quite a lot. But does not contain the APDUs. > > Can you also use GPShell to execute your commands? You can enable the > logging and this should to be able the same like JCShell. The commands > you are using a JCShell commands, but behind this works the GP library? > > I guess the x in the AID are just wildcards. 0x7A sounds bad, this is > not GP library specific error. An error from GP library should start > with 0x80.. I sound like a PC/SC problem, maybe a connection problem. > Maybe is is a system error. I found in winerror.h for Windows: > > > // > // MessageId: ERROR_ARENA_TRASHED > // > // MessageText: > // > // The storage control blocks were destroyed. > // > #define ERROR_ARENA_TRASHED 7L > > > Or error.h in Linux: > > *#define* ERRnumeric 7 > /* numeric error > * Result not meaningful (divide by zero) or not significant (Some > * statistical operations) > */ > > > Regards, > Karsten > > >> Starting last year with JCOP V2.2 everything was OK, and on switching >> over to V2.3.1 (with adapted boot sequence) I expected no problems, but >> strangely the process runs into an error, while the JCShell script doesn't! >> >> >> The Select command in step 3 >> >> "/select A000000003xxxxxxxx" >> -> GP211_send_APDU with CAPU 00 A4 04 00 09 A0 00 00 00 03 53 90 00 01 00 >> >> comes back with error code 0x7A. >> >> I have tried to find the meaning of this, but didn't found "7A"s except >> in some constant like GET_DATA_EF_PROD_DATA_CHECKSUM. >> >> Do you have a hint for me what the problem could be? >> >> Thanks in advance >> >> Matthias >> >> >> >> >> ********************************************************************************** >> /card -a a000000003000000 -c com.ibm.jc.CardManager >> get-cplc >> set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f >> set-key 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f >> set-key 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f >> set-key 1/1/DES-ECB/0b4.. >> set-key 1/2/DES-ECB/844.. >> set-key 1/3/DES-ECB/784.. >> print-key >> init-update >> ext-auth enc >> card-info >> put-keyset 1 >> card-info >> ###################################################### >> # STEP-2 >> ###################################################### >> # Install[for install and make selectable] on the # >> # SSD package, set SD privilege and set the install # >> # parameter to 45, eg C90145 --> accepts extradition # >> ###################################################### >> # -b option # >> ###################################################### >> init-update 1 >> ext-auth plain >> install -i A000000003xxxxxxxx -q C90145 -bms a0000000yyyyyy >> a0000000zzzzzzzz >> card-info >> >> ###################################################### >> # STEP-3 >> ###################################################### >> # Select the SSD, open a secure channel # >> ###################################################### >> /select A000000003xxxxxxxx >> init-update >> ext-auth enc >> >> ###################################################### >> # STEP-4 >> ###################################################### >> # PUT KEY the 1 secure channel keys --> # >> # SSD transitions automatically to the PERSONALIZED # >> # state # >> >> ###################################################### >> set-key 1/1/DES-ECB/ce.. >> set-key 1/2/DES-ECB/f7.. >> set-key 1/3/DES-ECB/98.. >> put-keyset 1 >> >> ********************************************************************************** >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Globalplatform-users mailing list >> Glo...@li... >> https://lists.sourceforge.net/lists/listinfo/globalplatform-users >> >> >> >> > > > > |