Re: [opensc-devel] Muscle smart card Applet various versions from M.U.S.C.L.E. and OpenSC

2012-12-12 Thread Ludovic Rousseau
2012/12/10 Douglas E. Engert deeng...@anl.gov:
 I am not using the Muscle card applet, but was looking looking at the OpenSC
 debug log for this thread:
 Re: [opensc-devel] The smart card reader is known as VMware Virtual USB CCID 
 00 00 in linux ??!!

 The OpenSC card-muscle.c (0.12.2 or 0.13.0) is looking for 
 PROTO_VERSION_MAJOR=1

 The author of the original note said:
I've loaded and initialized Muscle applet (0.9.11) on it.

 This appears in the log that GET_STATUS is returning: 00 01 00 05 ...
 i.e. PROTO_VERSION_MAJOR=0, PROTO_VERSION_MINOR=1

 This version from 2003-12-19, does not sound like the latest to me...

 Yet in the Muscle CVS archives:
http://anonscm.debian.org/viewvc/muscleplugins/trunk/MCardApplet/
 as of 4 years ago has version.properties has:

APPLET_VERSION_MAJOR=0
APPLET_VERSION_MINOR=9

PROTO_VERSION_MAJOR=1
PROTO_VERSION_MINOR=3

 And there have been changes in the SVN 9 months ago, 2 years ago and
 3 years ago, which are not reflected in the Download page:
https://alioth.debian.org/frs/?group_id=30111

 Can the download versions be update, or the page change to say
 compile it yourself? Or point to the OpenSC page?

I also noticed that the download section provides version 0.9.11 from
Dec 2003. But the README file has a version 0.9.12 from Feb 2008 that
is not available to download.

 Then on OpenSC-project:
http://www.opensc-project.org/opensc/wiki/MuscleApplet
 it says:
   OpenSC supports the Muscle applet, available from Debian SVN:
 svn co svn://svn.debian.org/muscleplugins/trunk/MCardApplet

 (This appears to be the same SVN as on the Muscle page, revision 298
  from 9 months ago.)

 An updated version, targeting recent JavaCard 2.2.2 cards with
 extended APDUs is available from github:
   http://github.com/martinpaljak/MuscleApplet

 This github is 3 years old, yet changes where made to the Muscle SVN
 9 months ago.


 https://github.com/martinpaljak/MuscleApplet/blob/master/src/com/musclecard/CardEdge/CardEdge.java
 (3 years old)
   buffer[pos++] = (byte) 1; // Major Card Edge Protocol version n.
   buffer[pos++] = (byte) 3; // Minor Card Edge Protocol version n.
   buffer[pos++] = (byte) 0; // Major Applet version n.
   buffer[pos++] = (byte) 9; // Minor Applet version n.

 Which is in line with the PROTO_VERSION_MAJOR the OpenSC code is looking for.

 Can Martin and Ludovic get together and get these versions in sync,
 and make it so others don't download the 9 year old version?

The MUSCLE applet needs a real maintainer. Any volunteer?

It looks like the 2-years old Martin's version on github already
includes the 9-months old fix from svn.debian.org.
So the (unmaintained) version from
http://anonscm.debian.org/viewvc/muscleplugins/trunk/MCardApplet/
could be removed and replaced by Martin's version.

I propose to:
- add a file DO_NOT_USE_ME.txt in the SVN repository to point the github version
- remove the MCardApplet-0.9.11.tar.gz from
https://alioth.debian.org/frs/?group_id=30111
- update the http://www.opensc-project.org/opensc/wiki/MuscleApplet
(and github wiki version) page to point to Martin's github version

Other ideas?

-- 
 Dr. Ludovic Rousseau
___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


Re: [opensc-devel] Muscle smart card Applet various versions from M.U.S.C.L.E. and OpenSC

2012-12-12 Thread Douglas E. Engert


On 12/12/2012 5:17 AM, Rns Course wrote:
This appears in the log that GET_STATUS is returning: 00 01 00 05 ...
   i.e. PROTO_VERSION_MAJOR=0, PROTO_VERSION_MINOR=1
 Where does GET_STATUS return 00 01 00 05 in log?
 I mean, how did you understand GET_STATUS return 00 01 00 05 from log file?

You had sent on 12/9 an attachment of the opensc debug log as output.txt.
(but I cant find the original note, but I still have the attachment.)

On line in output.txt, APDUs and responses from muscle_match_card in 
card-muscle.c:
425: APDU: 00 A4 04 00 05 A0 00 00 00 01
430: Response: 90 00
440: APDU: B0 3C 00 00 40
445: Response: 00 01 00 05 00 00 75 30 00 00 5E F6 02 02 00 00 90 00

Looking at the Muscle source that was available which is newer then the 0.9.11
I made the assumption that the actual data returned is from an older
version that had Protocol major=0  minor=1,  Applet major=0  minor=5


buffer[pos++] = (byte) 1; // Major Card Edge Protocol version n.
buffer[pos++] = (byte) 3; // Minor Card Edge Protocol version n.
buffer[pos++] = (byte) 0; // Major Applet version n.
buffer[pos++] = (byte) 9; // Minor Applet version n.

 I changed version in CardEdge.java source to 0.9.11  0.9.13 (before that, it 
 was  0.6.01 at the source!) and compile it again.

Its the major protocol version that OpenSC is checking, not the Applet version.

 But when I run pkcs15-init -C command, the output was as before:

 Using reader with a card: OMNIKEY CardMan 3x21 0
 New User PIN.
 Please enter User PIN:  (I entered )
   Please type again to verify:
 Unblock Code for New User PIN (Optional - press return for no PIN).
 Please enter User unblocking PIN (PUK):
 User PIN [User PIN] required.
 Please enter User PIN [User PIN]: (I entered )
 Failed to create PKCS #15 meta structure: File not found

 How should I force opensc-0.13.0 to work with Muscle 0.9.11?

If they are using different protocols, one side or the other will need changes.

Buy a Java 2.2.2 card?


 THX.

 
 *From:* Douglas E. Engert deeng...@anl.gov
 *To:* MUSCLE mus...@lists.musclecard.com; OpenSC-devel 
 opensc-devel@lists.opensc-project.org
 *Sent:* Tuesday, 11 December 2012, 0:01:32
 *Subject:* [opensc-devel] Muscle smart card Applet various versions from 
 M.U.S.C.L.E. and OpenSC

 I am not using the Muscle card applet, but was looking looking at the OpenSC
 debug log for this thread:
 Re: [opensc-devel] The smart card reader is known as VMware Virtual USB CCID 
 00 00 in linux ??!!

 The OpenSC card-muscle.c (0.12.2 or 0.13.0) is looking for 
 PROTO_VERSION_MAJOR=1

 The author of the original note said:
 I've loaded and initialized Muscle applet (0.9.11) on it.


 This appears in the log that GET_STATUS is returning: 00 01 00 05 ...
 i.e. PROTO_VERSION_MAJOR=0, PROTO_VERSION_MINOR=1
 This version from 2003-12-19, does not sound like the latest to me...

 Yet in the Muscle CVS archives:
 http://anonscm.debian.org/viewvc/muscleplugins/trunk/MCardApplet/
 as of 4 years ago has version.properties has:

APPLET_VERSION_MAJOR=0
APPLET_VERSION_MINOR=9

PROTO_VERSION_MAJOR=1
PROTO_VERSION_MINOR=3

 And there have been changes in the SVN 9 months ago, 2 years ago and
 3 years ago, which are not reflected in the Download page:
 https://alioth.debian.org/frs/?group_id=30111

 Can the download versions be update, or the page change to say
 compile it yourself? Or point to the OpenSC page?


 Then on OpenSC-project:
 http://www.opensc-project.org/opensc/wiki/MuscleApplet
 it says:
OpenSC supports the Muscle applet, available from Debian SVN:
  svn co svn://svn.debian.org/muscleplugins/trunk/MCardApplet

  (This appears to be the same SVN as on the Muscle page, revision 298
  from 9 months ago.)

  An updated version, targeting recent JavaCard 2.2.2 cards with
  extended APDUs is available from github:
 http://github.com/martinpaljak/MuscleApplet

 This github is 3 years old, yet changes where made to the Muscle SVN
 9 months ago.

 https://github.com/martinpaljak/MuscleApplet/blob/master/src/com/musclecard/CardEdge/CardEdge.java
 (3 years old)
  buffer[pos++] = (byte) 1; // Major Card Edge Protocol version n.
buffer[pos++] = (byte) 3; // Minor Card Edge Protocol version n.
buffer[pos++] = (byte) 0; // Major Applet version n.
buffer[pos++] = (byte) 9; // Minor Applet version n.

 Which is in line with the PROTO_VERSION_MAJOR the OpenSC code is looking for.

 Can Martin and Ludovic get together and get these versions in sync,
 and make it so others don't download the 9 year old version?

 Thanks.



 --

Douglas E. Engert  deeng...@anl.gov mailto:deeng...@anl.gov
Argonne National Laboratory
9700 South Cass Avenue
Argonne, Illinois  60439
(630)