Hi Chris,

Chris Malan wrote:
> 
> Hi,
> 
> sendComandApdu(AppletID aid, CommandAPDU cmd) in BasicAppletCardService
> obviously takes an applet ID.  My question is: does this method do applet
> selection implicitly or does one have to explicitly select the applet before
> invoking this method?  If one has to explicitly select the applet, the
> AppletID parameter seems superfluous.
> 

No.
The code of BasicAppletCardService::sendComandApdu(AppletID aid,
CommandAPDU cmd) says the truth:
--8<------
...
protected ResponseAPDU sendCommandAPDU(CardChannel channel, AppletID
appletID, CommandAPDU commandAPDU) throws       CardTerminalException,
CardServiceException {
        
        selectApplet(channel, appletID);
        
        return channel.sendCommandAPDU(commandAPDU);
...
-->8-----

the BasicAppletCardService::selectApplet method changes selection only,
if the appplet is not already selected.

> Second question: In one of the smart card tutorials it says the select
> command APDU looks like this:
> 
> CLA     INS     P1      P2      Lc              Data            Le
> 0x00    0xA4    0x04    0x00    aid.length      byte[] aid      0x00
> 
> I hope the spacing makes it accross the net.
> 
> In the JavaCard 2.1.1 API I find no mention of the P1 associated with 0x04.
> Is P1 containing 0x04 part of the select() command APDU, or not?
> 

04 for P1 means: the selection target is an application. This has noting
to do with JavaCard, it is an 
ISO command.

> As an aside, many of the documents dealing with smart cards seem very old,
> relatively speaking.  At the smart card alliance the last update of the ISO
> standards page was on January 10, 2000. The OCF-1.2  API itself is some years
> old.  I've been told to use JDK1.2.2 to avoid problems. Is it my imagination
> or is there some stagnation in smart card development?
> 

No, it is the complete failure of Java as client side programming
language. OCF is still useful for easy developing of portable smartcard
tools. The real language for smartcard host applications, especially
RSA's PKCS, is C. Take a look at smartsign.sourceforge.net or
www.linuxnet.com. The MuscleCard gets really the most out of
OpenPlatform JavaCards like Schlumberger's Cyberflerx Access 32K or the
GemPlus equivalent.

Cheeeeers
--
Martin Buechler . Sen. IT-Developer Systems & Technology
Pixelpark AG  .  http://www.pixelpark.com
Rotherstr. 8 .  10245 Berlin  .  Germany
phone: +49 30 5058 - 1891  fax: - 1600


---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to