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.class,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(GPKResponseAPDU.ja
va:104)
at
com.gemplus.opencard.service.gpk.access.GPKCardAccessor.selectFile(GPKCardAc
cessor.java:476)
at
com.gemplus.opencard.service.file.AbstractFileAccessCardService.internalWrit
e(AbstractFileAccessCardService.java:445)
at
com.gemplus.opencard.service.file.AbstractFileAccessCardService.write(Abstra
ctFileAccessCardService.java:528)
at
com.gemplus.opencard.service.file.AbstractFileAccessCardService.write(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.