The Cyberflex for Linux kit consists of a modified version of Xcard and
some Java classes.  These Java classes will be just fine.  Xcard is the
only thing that has to be ported to PC/SC.  I will be finishing the ICCSP
for Cryptoflex and Cyberflex in the next 2-3 weeks.  Then I will rewrite
Xcard (probably using GTK+) for use with PC/SC.  I will probably have to
hold off on the RPC stuff for a couple of months since I would like to
remove all the legacy applications that don't use PC/SC since they are
dead end.  I imagine the rewrite of Xcard will take about 3 weeks.  So my
guess that Cyberflex for Linux PC/SC will be available in March.  If
someone wants to write the PAM stuff using PC/SC that would be a quick
project.  (Plus, enough of the ICCSP is done for doing that).  You just
have to do:

#include <stdio.h>
#include "src/iccsp/slb_crypto4k/SCard.h"

   BYTE buffer[25];
   vector<BYTE> code;

   RESOURCEDB *resdb;
   SCARD *scard;
   FILEACCESS *filea;
   CHVERIFICATION *chv;

   resdb = new RESOURCEDB(rmgr);
   scard = new SCARD();

/*   setenv(PCSC_CONFIG, "/root/source/pcsc/etc/reader.conf", 0); */

   resdb->IntroduceReader("Reflex 60", "SLB_RF_60");
   scard->AttachByIFD("Reflex 60", 0x00);
   scard->CreateFileAccess( filea );
   scard->CreateCHVerification( chv );

  /* You would put in here the user entered password */
  /* I'm just putting in the default transport key   */
  /* but you can change your 0011 key file           */

   code.push_back(0x47); code.push_back(0x46);
   code.push_back(0x58); code.push_back(0x49);
   code.push_back(0x32); code.push_back(0x56);    
   code.push_back(0x78); code.push_back(0x40);

   if ( chv->Verify( code, 0x00, 0x01 ) == SCARD_S_SUCCESS ) {

     filea->Open(0x00, "/3f00/0200/1001", &hcard);
     filea->Read( hcard, 0x08, buffer, 0x00 );   

     /* You would have to compare the serial number with that
        stored in a file or database somewhere then and if all is
        OK return */

     return PAM_SUCCESS; /* or whatever it is */

   } else {
     return PAM_ERROR;  /* or whatever it is */
   }


*************************************************************
David Corcoran                 Internet Security/Smartcards

Home:                          Purdue University
2252 US Highway 52 West        Department of Computer Science
West Lafayette, IN 47906       CERIAS/COAST Laboratory
(765) 463-2455

http://www.cs.purdue.edu/homes/corcordt
http://www.linuxnet.com

*************************************************************



***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************

Reply via email to