hi Mohammed,
it sound like a similar problem that i had several month ago. i tried to
download a certificate of several hundred bytes, but when i read it later it
was messed up. i know that there was a bug in the card services. i send you
a version of the card services that worked for me on 25.10.2000. if you
want, i send it again.
by the way, yesterday i faced a problem with the card-services when i use
the PC/SC wrapper (beta 2.0, 21.12.200). when i use the GPK card services
the method
com.gemplus.opencard.service.gpk.signature.GPKKeyGenerationService.readPubli
cKey(...) returns a wrong result; i.e. not the key that was generated, i
rather returns always the same rubbish. on the first look it seems to be a
problem with chaining of several response APDUs. but i just guess.
warm regards
Karl
> -----Original Message-----
> From: Mohammed SADIQ [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 21, 2001 8:07 AM
> To: Sean Graham
> Cc: [EMAIL PROTECTED]
> Subject: RE: [OCF] Sample application showing problem with GPK8000
>
>
> Wait for a couple of hours & hopefully I will come up with my findings...
>
> ----------
> The difference between fiction and reality? Fiction has to make sense.
> - Tom Clancy
>
>
> >-----Original Message-----
> >From: Sean Graham [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, March 20, 2001 3:52 PM
> >To: [EMAIL PROTECTED]
> >Subject: [OCF] Sample application showing problem with GPK8000
> >
> >
> >Hello all...
> >
> >
> >I've attached an application that demonstrates the
> >aforementioned problem
> >with "writing" to the GPK8000 card. If someone else could run
> >it to see if
> >they get the same results it would be greatly appreciated.
> >
> >Below are the results that I obtained.
> >
> >Thanks
> >
> >-- Sean
> >
> >I am using Borland JBuilder 3.0 running with the SDK 1.3, but
> >I get the
> >same results if I compile it with the SDK 1.3 itself.
> >
> >If you look at the code, the last block of code should return
> >the initial
> >data written to the card followed by zeros to the end of the
> >file, but it
> >does not. See the hex dump comparison below. Any byte followed by an
> >asterisk is erroneous.
> >
> >Again the dump will only look correct if your window can display 110
> >characters wide in a fixed width font. (try copying to notepad
> >with word
> >wrap disabled if it doesn't look right)
> >
> >
> >(and what is this about not being allowed to use HTML posts??
> >I tried to
> >use [B] and [TT] and it rejected my post...??)
> >
> >---------------------------------------------------------------
> >--------------------
> >
> >
> >Starting smartcard
> >Creating CardRequest
> >Waiting for card
> >Erase Card
> >
> >Creating DF :3F00:D000
> >Creating 4096 byte EF :3F00:D000:D001
> >Verifying initial status of card...
> >Writing 4096 of zeros to :3F00:D000:D001....
> >Reading 4096 bytes of data...
> >Verifying zeroed status of card...
> >Generating data to write...
> >Writing 256 bytes of data to :3F00:D000:D001....
> >Reading 4096 bytes of data...
> >Verifying status of card...
> >Writing 3840 bytes of zeroes starting at offset 256 of file
> >:3F00:D000:D001....
> >Reading 4096 bytes of data...
> >Verifying data:
> > ------Read Data--------------------------------
> >------Original
> >Data----------------------------
> >0000: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F --- 00
> >01 02 03 04
> >05 06 07 08 09 0A 0B 0C 0D 0E 0F
> >0016: 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F --- 10
> >11 12 13 14
> >15 16 17 18 19 1A 1B 1C 1D 1E 1F
> >0032: 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F --- 20
> >21 22 23 24
> >25 26 27 28 29 2A 2B 2C 2D 2E 2F
> >0048: 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F --- 30
> >31 32 33 34
> >35 36 37 38 39 3A 3B 3C 3D 3E 3F
> >0064: 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F --- 40
> >41 42 43 44
> >45 46 47 48 49 4A 4B 4C 4D 4E 4F
> >0080: 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F --- 50
> >51 52 53 54
> >55 56 57 58 59 5A 5B 5C 5D 5E 5F
> >0096: 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F --- 60
> >61 62 63 64
> >65 66 67 68 69 6A 6B 6C 6D 6E 6F
> >0112: 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F --- 70
> >71 72 73 74
> >75 76 77 78 79 7A 7B 7C 7D 7E 7F
> >0128: 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F --- 80
> >81 82 83 84
> >85 86 87 88 89 8A 8B 8C 8D 8E 8F
> >0144: 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F --- 90
> >91 92 93 94
> >95 96 97 98 99 9A 9B 9C 9D 9E 9F
> >0160: A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF --- A0
> >A1 A2 A3 A4
> >A5 A6 A7 A8 A9 AA AB AC AD AE AF
> >0176: B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF --- B0
> >B1 B2 B3 B4
> >B5 B6 B7 B8 B9 BA BB BC BD BE BF
> >0192: C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF --- C0
> >C1 C2 C3 C4
> >C5 C6 C7 C8 C9 CA CB CC CD CE CF
> >0208: D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF --- D0
> >D1 D2 D3 D4
> >D5 D6 D7 D8 D9 DA DB DC DD DE DF
> >0224: E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF --- E0
> >E1 E2 E3 E4
> >E5 E6 E7 E8 E9 EA EB EC ED EE EF
> >0240: F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF --- F0
> >F1 F2 F3 F4
> >F5 F6 F7 F8 F9 FA FB FC FD FE FF
> >0256: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00 00 00 00
> >0272: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00 00 00 00
> >0288: 00 00 00 00 00 00 00 00 00 00 00 00 2C*2D*2E*2F* --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00*00*00*00*
> >0304: 30*31*32*33*34*35*36*37*38*39*3A*3B*3C*3D*3E*3F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0320: 40*41*42*43*44*45*46*47*48*49*4A*4B*4C*4D*4E*4F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0336: 50*51*52*53*54*55*56*57*58*59*5A*5B*5C*5D*5E*5F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0352: 60*61*62*63*64*65*66*67*68*69*6A*6B*6C*6D*6E*6F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0368: 70*71*72*73*74*75*76*77*78*79*7A*7B*7C*7D*7E*7F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0384: 80*81*82*83*84*85*86*87*88*89*8A*8B*8C*8D*8E*8F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0400: 90*91*92*93*94*95*96*97*98*99*9A*9B*9C*9D*9E*9F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0416: A0*A1*A2*A3*A4*A5*A6*A7*A8*A9*AA*AB*AC*AD*AE*AF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0432: B0*B1*B2*B3*B4*B5*B6*B7*B8*B9*BA*BB*BC*BD*BE*BF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0448: C0*C1*C2*C3*C4*C5*C6*C7*C8*C9*CA*CB*CC*CD*CE*CF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0464: D0*D1*D2*D3*D4*D5*D6*D7*D8*D9*DA*DB*DC*DD*DE*DF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0480: E0*E1*E2*E3*E4*E5*E6*E7*E8*E9*EA*EB*EC*ED*EE*EF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0496: F0*F1*F2*F3*F4*F5*F6*F7*F8*F9*FA*FB*FC*FD*FE*FF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0512: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00 00 00 00
> >0528: 00 00 00 00 00 00 00 00 00 00 00 00 1C*1D*1E*1F* --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00*00*00*00*
> >0544: 20*21*22*23*24*25*26*27*28*29*2A*2B*2C*2D*2E*2F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0560: 30*31*32*33*34*35*36*37*38*39*3A*3B*3C*3D*3E*3F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0576: 40*41*42*43*44*45*46*47*48*49*4A*4B*4C*4D*4E*4F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0592: 50*51*52*53*54*55*56*57*58*59*5A*5B*5C*5D*5E*5F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0608: 60*61*62*63*64*65*66*67*68*69*6A*6B*6C*6D*6E*6F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0624: 70*71*72*73*74*75*76*77*78*79*7A*7B*7C*7D*7E*7F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0640: 80*81*82*83*84*85*86*87*88*89*8A*8B*8C*8D*8E*8F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0656: 90*91*92*93*94*95*96*97*98*99*9A*9B*9C*9D*9E*9F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0672: A0*A1*A2*A3*A4*A5*A6*A7*A8*A9*AA*AB*AC*AD*AE*AF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0688: B0*B1*B2*B3*B4*B5*B6*B7*B8*B9*BA*BB*BC*BD*BE*BF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0704: C0*C1*C2*C3*C4*C5*C6*C7*C8*C9*CA*CB*CC*CD*CE*CF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0720: D0*D1*D2*D3*D4*D5*D6*D7*D8*D9*DA*DB*DC*DD*DE*DF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0736: E0*E1*E2*E3*E4*E5*E6*E7*E8*E9*EA*EB*EC*ED*EE*EF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0752: F0*F1*F2*F3*F4*F5*F6*F7*F8*F9*FA*FB*FC*FD*FE*FF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0768: 00 00 00 00 00 00 00 00 00 00 00 00 0C*0D*0E*0F* --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00*00*00*00*
> >0784: 10*11*12*13*14*15*16*17*18*19*1A*1B*1C*1D*1E*1F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0800: 20*21*22*23*24*25*26*27*28*29*2A*2B*2C*2D*2E*2F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0816: 30*31*32*33*34*35*36*37*38*39*3A*3B*3C*3D*3E*3F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0832: 40*41*42*43*44*45*46*47*48*49*4A*4B*4C*4D*4E*4F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0848: 50*51*52*53*54*55*56*57*58*59*5A*5B*5C*5D*5E*5F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0864: 60*61*62*63*64*65*66*67*68*69*6A*6B*6C*6D*6E*6F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0880: 70*71*72*73*74*75*76*77*78*79*7A*7B*7C*7D*7E*7F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0896: 80*81*82*83*84*85*86*87*88*89*8A*8B*8C*8D*8E*8F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0912: 90*91*92*93*94*95*96*97*98*99*9A*9B*9C*9D*9E*9F*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0928: A0*A1*A2*A3*A4*A5*A6*A7*A8*A9*AA*AB*AC*AD*AE*AF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0944: B0*B1*B2*B3*B4*B5*B6*B7*B8*B9*BA*BB*BC*BD*BE*BF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0960: C0*C1*C2*C3*C4*C5*C6*C7*C8*C9*CA*CB*CC*CD*CE*CF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0976: D0*D1*D2*D3*D4*D5*D6*D7*D8*D9*DA*DB*DC*DD*DE*DF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >0992: E0*E1*E2*E3*E4*E5*E6*E7*E8*E9*EA*EB*EC*ED*EE*EF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >1008: F0*F1*F2*F3*F4*F5*F6*F7*F8*F9*FA*FB*FC*FD*FE*FF*
> >--- 00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*00*
> >1024: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00 00 00 00
> >1040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00 00 00 00
> >1056: 00 00 00 00 00 00 00 00 00 00 00 00 2C*2D*2E*2F* --- 00
> >00 00 00 00
> >00 00 00 00 00 00 00 00*00*00*00*
> >
> ><<-------snip -- pattern repeats------------>>
>
>
> ---
> > 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.
>
>
>
---
> 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.