OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Axel Heider (axel.heidertowitoko.de)
Date: Sat Dec 08 2001 - 20:10:10 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    David,

    > DC: I'm forwarding this bounced message but I want to comment on Carlos's
    > DC: email. That approach would be fine, lets see what the others think.
    > DC: I suppose you could also use SCardControl and we could design a PPS

    > DC: structure .... Does anyone know how it is done on Win32 ?

    I asked this question in the Microsoft SmartCard DDK Mailinglist
    some time ago. They told me it's up to the driver to check the
    ATR setting and apply a PPS/PTS. Furthermore, the SMCLIB can
    assist by translating the ATR and tell the driver what to do.

    All you can do manually in you application is setting a parameter
    during tha call to SetProtocol:

       from WINSMCRD.H

       #define SCARD_PROTOCOL_UNDEFINED 0x00000000
         // There is no active protocol.
       #define SCARD_PROTOCOL_T0 0x00000001
         // T=0 is the active protocol.
       #define SCARD_PROTOCOL_T1 0x00000002
         // T=1 is the active protocol.
       #define SCARD_PROTOCOL_RAW 0x00010000
         // Raw is the active protocol.
       #define SCARD_PROTOCOL_DEFAULT 0x80000000
          // Use implicit PTS.

       // Since using the optimal parameters is the default case
       // no bit is defined to be 1

       #define SCARD_PROTOCOL_OPTIMAL 0x00000000
        // Use PTS to optimize protocol.

    This leaves some questions:

    * What really is the optimal setting for any card?
    * What if the card's ATR does not tell the optimal setting?
    * What if the optimal setting for my application/environment
       is not the setting given in the ATR?

    Unfortunately, there is no way to issue a PPS/PTS via PC/SC
    manually in Windows. And so we have many vendor-specific
    implementation, which offer a proprietary way.

    Axel

    ***************************************************************
    Unix Smart Card Developers - M.U.S.C.L.E.
    (Movement for the Use of Smart Cards in a Linux Environment)
    http://www.linuxnet.com/
    To unsubscribe send an email to majordomolinuxnet.com with
    unsubscribe sclinux
    ***************************************************************