[Muscle] GlobalPlatform component

Peter Williams home_pw at msn.com
Tue Mar 25 22:32:36 PDT 2008


the only "testing" to date is that it links, and the binary loads: it debugs 
fine in visual studio 2005, now.

---------

I am getting confused over the following lines in GlobalPlatform.c

#define OP201 0x01 //!< Operation mode for OpenPlatform 2.0.1'
#define GP211 0x02 //!< Operation mode for GlobalPlatform 2.1.1

These #defined symbols are also defined in an .h file.

As the card mode and the platform mode interact , when used with GPShell, 
the library will not put the OP201 DES algid into the putkey APDU when the 
shell is using the .h value for OP201 (201) whilst the library is testing 
casd mode against the symbol whose value is defined in the .c file(1). 
Obviously, 201 != 1.

 It happens to work for the default case, GP211, and thus logic seems to 
always force the default case. This may explain why I get (key) algorithm 
not supported errors back from my 6464C/Martsoft and Phillips/JCOP21 201-era 
cards, when doing usig GPshells putkey command.

Analysis and testing on still ongoing, note.



--------------------------------------------------
From: "Karsten Ohme" <widerstand at t-online.de>
Sent: Tuesday, March 25, 2008 4:15 PM
To: "MUSCLE" <muscle at lists.musclecard.com>
Subject: Re: [Muscle] GlobalPlatform component

> Peter Williams schrieb:
>>  Recommend adding !defined(OPGP_LIB) to GlobalPlatform.h, to allow static 
>> library build, as in following suggested change
>
> Have you already tested this? Is there anything more necessary when 
> linking an application against the static library?
>
> Karsten
>
>>  #if defined(WIN32)&& !defined(OPGP_LIB)
>>  #ifdef OPGP_EXPORTS
>>  #define OPGP_API __declspec(dllexport)
>>  #else
>>  #define OPGP_API __declspec(dllimport)
>>  #endif
>> #else
>>  #define OPGP_API
>> #endif
>>
>> ------------------------------------------------------------------------
>> In a rush? Get real-time answers with Windows Live Messenger. 
>> <http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Muscle mailing list
>> Muscle at lists.musclecard.com
>> http://lists.drizzle.com/mailman/listinfo/muscle
>
> _______________________________________________
> Muscle mailing list
> Muscle at lists.musclecard.com
> http://lists.drizzle.com/mailman/listinfo/muscle
> 


More information about the Muscle mailing list