Bruce,

Thanks for the feedback, see my comments below...

On Thu, 30 Sep 2004, Bruce Barnett wrote:

Date: Thu, 30 Sep 2004 11:09:23 -0400 (EDT)
From: Bruce Barnett <[EMAIL PROTECTED]>
Reply-To: MUSCLE <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [Muscle] [ANNOUNCE] Perl-Utility and interactive shell for
    GlobalPlatform compliant Smartcards and the Muscle Applet


http://oss.stamfest.net/Chipcard-GlobalPlatform/Chipcard-GlobalPlatform-0.01.tar.gz

Thanks for the tool, Peter. Looks good. But I have to get pcsc-perl working first. Hmm.

When I build pcsc-perl-1.4.2, I get

make[1]: Leaving directory `/local/Java/pcscdriver/pcsc-perl-1.4.2/Card'
/usr/bin/perl /usr/lib/perl5/5.8.3/ExtUtils/xsubpp  -typemap 
/usr/lib/perl5/5.8.3/ExtUtils/typemap -typemap typemap  PCSC.xs > PCSC.xsc && mv 
PCSC.xsc PCSC.c
gcc -c  `pkg-config --cflags libpcsclite` -I/local/pcsc/include -I/local/pcsc/include/PCSC -D_REENTRANT 
-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=\"0.03\" 
-DXS_VERSION=\"0.03\" -fPIC "-I/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE"  -O2 -Wall 
PCSC.c
PCSC.c: In function `XS_Chipcard__PCSC__EstablishContext':
PCSC.c:444: warning: unused variable `RETVAL'
PCSC.c: In function `XS_Chipcard__PCSC__ListReaders':
PCSC.c:501: warning: unused variable `RETVAL'
PCSC.c: In function `XS_Chipcard__PCSC__Connect':
PCSC.c:596: warning: unused variable `RETVAL'
PCSC.c: In function `XS_Chipcard__PCSC__Reconnect':
PCSC.c:627: warning: unused variable `RETVAL'
PCSC.c: In function `XS_Chipcard__PCSC__Status':
PCSC.c:696: warning: unused variable `RETVAL'
PCSC.c: In function `XS_Chipcard__PCSC__Transmit':
PCSC.c:821: warning: unused variable `RETVAL'
PCSC.c: In function `XS_Chipcard__PCSC__Control':
PCSC.c:935: warning: unused variable `RETVAL'
PCSC.c: In function `XS_Chipcard__PCSC__GetStatusChange':
PCSC.c:1077: warning: unused variable `RETVAL'



But that's a warning. I installed your package, did a make test - fine.
So I inserted a CyberFlex e-gate 32K card, and did:


examples% gpsh provision ERROR: cannot open


That must be the load command not finding the CardEdge.bin file - fixed the error message



Printing the name of the file that cannot be opend would be useful. Also starting your gpsh script with #!/usr/bin/perl -w is a good idea. I get:



Good idea. I never thought about it, because the gpsh started out as a test script...


"my" variable $proto masks earlier declaration in same scope at /usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform.pm line 55.

fixed, stupid me (but not a bug)

"my" variable $sw masks earlier declaration in same scope at /usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Applet/Muscle.pm line 118, <R> line 17.

fixed, stupid me

Exiting subroutine via next at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Applet/OPEN.pm line 731, <R> 
line 17.
Exiting eval via next at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Applet/OPEN.pm line 731, <R> 
line 17.
Exiting subroutine via next at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Applet/OPEN.pm line 731, <R> 
line 17.

Yeah, that part was moved out of a loop into a sub and forgotten about...

Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Applet/OPEN.pm line 885, <R> line 36.

should be fixed

Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Applet/OPEN.pm line 885, <R> line 36.

same bug

ERROR: cannot open

As said above: the load command cannot find the file

I changed gpsh to keep track of the file and line an error occurs on in non-interactive (script) mode. Also, gpsh dies with a non-zero exit code at the first error.

ERROR: Wrong parameter(s) P1-P2. Not enough memory space in the file.

OK, that is a followup bug of the load command not finding the load file (or finding a file that is not a load file)


Illegal hexadecimal digit 'M' ignored at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform.pm line 38, <R> line 54.
Illegal hexadecimal digit 's' ignored at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform.pm line 38, <R> line 54.
Illegal hexadecimal digit 'l' ignored at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform.pm line 38, <R> line 54.
Illegal hexadecimal digit 'M' ignored at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Tools.pm line 31, <R> line 54.
Illegal hexadecimal digit 's' ignored at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Tools.pm line 31, <R> line 54.
Illegal hexadecimal digit 'l' ignored at 
/usr/lib/perl5/site_perl/5.8.3/Chipcard/GlobalPlatform/Tools.pm line 31, <R> line 54.
ERROR: Could not select
ERROR: Cannot interpret: setup Muscle00 2 1 1234 1234 4 3 4321 5678 3900 00 02 01


Cannot reproduce this.

I fixed a lot of other ugly cases as well...


I'll try to submit some patches later if I can. I'm in the middle of debugging some pam issues.

You are welcome...

peter

_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to