I simply want to create a directory but obtain an Access Condition error. Here's my code:
CardRequest cr = new
CardRequest(FileAccessCardService.class);
SmartCard sc = SmartCard.waitForCard(cr);FileUtilityCardService fus = (FileUtilityCardService)
sc.getCardService(FileUtilityCardService.class, true);
//FileSystemService
GPKFileSystemService fss = (GPKFileSystemService)
sc.getCardService(FileSystemCardService.class, true);// Provide credentials for Administrative key :3F00:3F01
CredentialBag bag = new CredentialBag();
GPKCredentialStore store = new GPKCredentialStore();
GPKAdministrativeCredential credential = new GPKAdministrativeCredential();
store.storeCredential(0, credential);
bag.addCredentialStore(store);
//ef_3FO1 == ":3F00:3F01" (where the system key resides)
fss.provideCredentials(ef_3F01, bag);fus.eraseCard();
//Doesn't work!!
fus.createDF(df_8000, false, null);Here's the exception i obtain:
com.gemplus.opencard.service.gpk.GPKException: ISO error (69 82): Access condition not fulfilled:
Secure messaging required and no key specified in Access Condition.
Secure messaging required and no temporary administration key established.
at com.gemplus.opencard.service.gpk.GPKResponseAPDU.validate(Unknown Source)
at com.gemplus.opencard.service.gpk.access.GPKCardAccessor.executeCommand(Unknown Source)
at com.gemplus.opencard.service.gpk.file.GPKFileSystemService.create(Unknown Source)
at com.gemplus.opencard.service.gpk.file.GPKFileUtilityService.createEF(Unknown Source)
at com.gemplus.opencard.service.gpk.file.GPKFileUtilityService.createSecretKeyFile(Unknown Source)
at security_test.smartcard.ReadFile.main(ReadFile.java:65)
---
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.
