Hi, guess you need to specify a transport key. If you don't have one delivered with your card, you could try the default one: "TEST KEYTEST KEY" (16 bytes).
Note: I don't use the GPK card services, and I don't know if your card uses that default key, so you may want to be very careful with this (try only once or twice) or you risk to block your card permanently... Best regards, Stef -----Original Message----- From: Farid Mehr [mailto:[EMAIL PROTECTED] Sent: dinsdag 26 augustus 2003 10:18 To: [EMAIL PROTECTED] Subject: [OCF] Access Conditio Problem with GPK8000 Hello, 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(Unkno wn 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.createSecretKeyF ile(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. --- > 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.
