i have never tried to use a LinearFixedFile. only transparent files. maybe
you can inspect the card with the GPKPilot (downloadable from Gemplus
developers website) and see, if the file was really created on the card.
sorry that i cannot provide more specific help.

  Karl

--

Karl Scheibelhofer, <mailto:[EMAIL PROTECTED]>
Institute for Applied Information Processing and Communications (IAIK)
at Graz University of Technology, Austria, http://www.iaik.at and
http://jcewww.iaik.at
Phone: (+43) (316) 873-5540


> -----Original Message-----
> From: Jim O'Connor [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 23, 2001 1:04 AM
> To: [EMAIL PROTECTED]
> Subject: [OCF] problems creating a EF on a GEMSAFE card. Any help would
> be greatly appreciated!!!
>
>
> I am  having problems creating a EF on a GEMSAFE card.  I have
> been pulling
> my hair out with this stuff.  I execute the following code:
>
>
>         CardFilePath ef_3F01 = new CardFilePath(":3F00:3F01");
>         CardFilePath ef_3F04 = new CardFilePath(":3F00:3F04");
>
>         FileAccessCardServie facs = (FileAccessCardService)
> sc.getCardService(FileAccessCardService.class, true);
>         GPKFileSystemService fss = (GPKFileSystemService)
> sc.getCardService(FileSystemCardService.class, true);
>         GPKFileUtilityService fus =
> (GPKFileUtilityService)sc.getCardService(GPKFileUtilityService.cla
> ss,true);
>
>         store.storeCredential(0,credential);
>         bag.addCredentialStore(store);
>         fus.provideCredentials(ef_3F01,bag);
>         fus.provideCredentials(ef_3F04,bag);
>         System.out.println("Done providing credentials.");
>
>         fus.createLinearFixedFile(ef_3F04,100,100,null);
>         System.out.println("Done creating file.");
>         byte[] block = new byte[100];
>
>         for(int i = 0; i < 100; i++) {
>            block[i] = (byte)i;
>         }
>         facs.write(ef_3F04,100,block);
>         System.out.println("Done Writing EF File.");
>         Vector      v = fus.dir(root);
>         Enumeration enum = v.elements();
>
>         while(enum.hasMoreElements()) {
>           System.out.println(enum.nextElement().toString());
>         }
>         sc.close();
>
> and get no exception until the write
> operation(facs.write(ef_3F04,100,block)).  I then get the following
> exception:
>
> com.gemplus.opencard.service.gpk.GPKException: ISO error (6A 82): File not
> found.
>
> at
> com.gemplus.opencard.service.gpk.GPKResponseAPDU.validate(GPKRespo
> nseAPDU.ja
> va:104)
>
> at
> com.gemplus.opencard.service.gpk.access.GPKCardAccessor.selectFile
> (GPKCardAc
> cessor.java:476)
>
> at
> com.gemplus.opencard.service.file.AbstractFileAccessCardService.in
> ternalWrit
> e(AbstractFileAccessCardService.java:445)
>
> at
> com.gemplus.opencard.service.file.AbstractFileAccessCardService.wr
> ite(Abstra
> ctFileAccessCardService.java:528)
>
> at
> com.gemplus.opencard.service.file.AbstractFileAccessCardService.wr
> ite(Abstra
> ctFileAccessCardService.java:551)
>
> at ValexiaTerm.main(ValexiaTerm.java:247)
>
>
>
> any idea what is going on?  All I want to do is serialize an object and
> write it to a smart card.
>
> Again, any help would be greatly appreciated....
>
>
>
>
> ---
> > 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.

Reply via email to