diff --git a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccAPITestCardService.java b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccAPITestCardService.java index cc152c20fe81eb1708ad382c007289f14d0b041b..5768f0bc0b689c54bf0a67f0783081ab39e71044 100644 --- a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccAPITestCardService.java +++ b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccAPITestCardService.java @@ -9,7 +9,7 @@ package org.etsi.scp.wg3.uicc.jcapi.userclass; import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; -public class UiccAPITestCardService implements UiccCardManagementService,UiccAdministrativeCommandsService,UiccApplicationManagementService,UiccToolkitService { +public abstract class UiccAPITestCardService implements UiccCardManagementService,UiccAdministrativeCommandsService,UiccApplicationManagementService,UiccToolkitService,UiccResultsService { public static UiccAPITestCardService TestReference = null; @@ -19,406 +19,10 @@ public class UiccAPITestCardService implements UiccCardManagementService,UiccAdm */ public static UiccAPITestCardService getTheUiccTestCardService() { if (TestReference == null) { - return new UiccAPITestCardService(); + throw new UnsupportedOperationException("TestReference has not been set"); } else { return TestReference; } } - - @Override - public String reset() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectFile(String FileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectFile(String LogicalChannel, String FileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectForActivation(String DFname) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectForActivation(String LogicalChannel, String DFname) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectForTermination(String DFname) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectForTermination(String LogicalChannel, String DFname) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse activate(String FileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse activate(String LogicalChannel, String FileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse deactivate(String FileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse deactivate(String LogicalChannel, String FileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse manageChannel(String OperationCode, String ChannelNb) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse manageChannel(String LogicalChannel, String OperationCode, String ChannelNb) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse status(String AppStatus, String ReturnedData, String DataLength) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse status(String LogicalChannel, String AppStatus, String ReturnedData, String DataLength) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse readBinary(String sfiOffset, String length) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse readBinary(String logicalChannel, String sfiOffset, String length) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse readRecord(String recordNb, String mode, String length) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse readRecord(String logicalChannel, String recordNb, String mode, String length) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse updateBinary(String sfiOffset, String data) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse updateBinary(String logicalChannel, String sfiOffset, String data) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse updateRecord(String recordNb, String mode, String data) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse updateRecord(String logicalChannel, String recordNb, String mode, String data) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse increase(String incValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse increase(String logicalChannel, String incValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse verifyPIN(String keyRef, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse verifyPIN(String logicalChannel, String keyRef, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse changePIN(String keyRef, String OldPINValue, String NewPINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse changePIN(String logicalChannel, String keyRef, String OldPINValue, String NewPINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse enablePIN(String keyRef, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse enablePIN(String logicalChannel, String keyRef, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse disablePIN(String keyRef, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse disablePIN(String logicalChannel, String keyRef, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse unblockPIN(String keyRef, String unblockPINValue, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse unblockPIN(String logicalChannel, String keyRef, String unblockPINValue, String PINValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse sendApdu(String apduCommand) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse createFile(String fcpValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse createFile(String logicalChannel, String fcpValue) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse deleteFile(String fileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse deleteFile(String logicalChannel, String fileId) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse resizeFile(String fileId, String size) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse resizeFile(String logicalChannel, String fileId, String size) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse loadPackage(String capFilePath) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse installApplet(String capFilePath, String classAID, String appAID, String uiccSystemSpecificParameters) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse installInstallApplet(String capFilePath, String classAID, String appAID, String uiccSystemSpecificParameters) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse makeSelectableApplet(String appAID) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectApplication(String AID) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse selectApplication(String LogicalChannel, String AID) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse lockApplication(String appletAid) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse unlockApplication(String appletAid) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse deleteApplet(String AID) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse deletePackage(String capFilePath) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse deletePackageAndAllRelatedApplications(String capFilePath) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse terminalProfileSession(String tpStr) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse terminalProfile(String tpStr) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse fetch(String expDataLength) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse terminalResponse(String cmd) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeMenuSelection(String itemIdTLV, String HelpRequestTLV) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeCallControlByNAA() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeTimerExpiration(String TimerIdTLV) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse unrecognizedEnvelope() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadMTCall() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadCallConnected() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadCallDisconnected() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadLocationStatus() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadUserActivity() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadIdleScreenAvailable() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadCardReaderStatus() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadLanguageSelection() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadBrowserTermination() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadDataAvailable(String ChannelStatusTLV) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadChannelStatus(String ChannelStatusTLV) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadAccessTechnologyChange() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadDisplayParametersChanged() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadLocalConnection(String ServiceRecordTLV) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadNetworkSearchModeChange() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadBrowsingStatus() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadFramesInformationChanged() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - - @Override - public APDUResponse envelopeEventDownloadHCIConnectivity() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } - } diff --git a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccTestModel.java b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccTestModel.java index 32ef4a469cb3ebe041b13b6ecfff85400856b3f8..df131a95cf5aff55ed325f8b8c76287c8b5a2a0f 100644 --- a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccTestModel.java +++ b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userclass/UiccTestModel.java @@ -9,4 +9,36 @@ package org.etsi.scp.wg3.uicc.jcapi.userclass; public abstract class UiccTestModel { public abstract boolean run(); + + /** + * Initialises the results, removing all previous results. + */ + protected final void initialiseResults() + { + UiccAPITestCardService.getTheUiccTestCardService().initialiseResults(); + } + + /** + * Adds a new result. + */ + protected final void addResult(boolean result) + { + UiccAPITestCardService.getTheUiccTestCardService().addResult(result); + } + + /** + * Returns the overall result, based on all results submitted via {@link #addResult(boolean)} + * since the last call to {@link #initialiseResults()}. + *

+ * The following logic is used: + *

+ */ + protected final boolean getOverallResult() + { + return UiccAPITestCardService.getTheUiccTestCardService().getOverallResult(); + } } diff --git a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccApplicationManagementService.java b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccApplicationManagementService.java index 232d935c755a05f16e9ceabdaa3d3c81f981f251..da5812ff1752426f290468f3fe86a87e785c72e0 100644 --- a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccApplicationManagementService.java +++ b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccApplicationManagementService.java @@ -23,7 +23,24 @@ public interface UiccApplicationManagementService { * @param UICC System Specific TLV as defined in 102 226 specification, as String * @return ResponseAPDU Object, corresponding to the GlobalPlatform command response. */ - public APDUResponse installApplet(String capFilePath, String classAID, String appAID, String uiccSystemSpecificParameters); + default APDUResponse installApplet(String capFilePath, String classAID, String appAID, String uiccSystemSpecificParameters) + { + return installApplet(capFilePath, classAID, appAID, uiccSystemSpecificParameters, false); + } + + /** + * install and makeSelectable an instance in the card + * @param relative path of the cap file, as String + * @param Aid of the class, as String + * @param Aid of the instance, as String + * @param UICC System Specific TLV as defined in 102 226 specification, as String + * @param immediate91XXExpected whether the card is expected to return 91XX immediately after this operation. + * If {@code true}, this parameter is intended as a hint when using an SCP such as SCP80, + * to NOT fetch the corresponding proactive command, + * as it is expected to occur subsequently in the test case. + * @return ResponseAPDU Object, corresponding to the GlobalPlatform command response. + */ + APDUResponse installApplet(String capFilePath, String classAID, String appAID, String uiccSystemSpecificParameters, boolean immediate91XXExpected); /** * install an applet in installed state @@ -40,7 +57,21 @@ public interface UiccApplicationManagementService { * @param AID of the instance, as String * @return ResponseAPDU Object, corresponding to the GlobalPlatform command response. */ - public APDUResponse makeSelectableApplet(String appAID); + default APDUResponse makeSelectableApplet(String appAID) + { + return makeSelectableApplet(appAID, false); + } + + /** + * make an applet selectable (install for make selectable) + * @param AID of the instance, as String + * @param immediate91XXExpected whether the card is expected to return 91XX immediately after this operation. + * If {@code true}, this parameter is intended as a hint when using an SCP such as SCP80, + * to NOT fetch the corresponding proactive command, + * as it is expected to occur subsequently in the test case. + * @return ResponseAPDU Object, corresponding to the GlobalPlatform command response. + */ + APDUResponse makeSelectableApplet(String appAID, boolean immediate91XXExpected); /** * perform a SelectApplication APDU command @@ -56,21 +87,63 @@ public interface UiccApplicationManagementService { * @param AID of application, as String * @return ResponseAPDU Object, containing the application response */ - public APDUResponse lockApplication(String appletAid); + default APDUResponse lockApplication(String appletAid) + { + return lockApplication(appletAid, false); + } + + /** + * lock an application + * @param AID of application, as String + * @param immediate91XXExpected whether the card is expected to return 91XX immediately after this operation. + * If {@code true}, this parameter is intended as a hint when using an SCP such as SCP80, + * to NOT fetch the corresponding proactive command, + * as it is expected to occur subsequently in the test case. + * @return ResponseAPDU Object, containing the application response + */ + APDUResponse lockApplication(String appletAid, boolean immediate91XXExpected); + + /** + * unlock an application + * @param AID of application, as String + * @return ResponseAPDU Object, containing the application response + */ + default APDUResponse unlockApplication(String appletAid) + { + return unlockApplication(appletAid, false); + } /** * unlock an application * @param AID of application, as String + * @param immediate91XXExpected whether the card is expected to return 91XX immediately after this operation. + * If {@code true}, this parameter is intended as a hint when using an SCP such as SCP80, + * to NOT fetch the corresponding proactive command, + * as it is expected to occur subsequently in the test case. * @return ResponseAPDU Object, containing the application response */ - public APDUResponse unlockApplication(String appletAid); + APDUResponse unlockApplication(String appletAid, boolean immediate91XXExpected); + + /** + * delete an applet specified by its AID + * @param AID of applet, as String + * @return ResponseAPDU Object + */ + default APDUResponse deleteApplet(String AID) + { + return deleteApplet(AID, false); + } /** * delete an applet specified by its AID * @param AID of applet, as String + * @param immediate91XXExpected whether the card is expected to return 91XX immediately after this operation. + * If {@code true}, this parameter is intended as a hint when using an SCP such as SCP80, + * to NOT fetch the corresponding proactive command, + * as it is expected to occur subsequently in the test case. * @return ResponseAPDU Object */ - public APDUResponse deleteApplet(String AID); + APDUResponse deleteApplet(String AID, boolean immediate91XXExpected); /** * delete a package specified by its path diff --git a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccToolkitService.java b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccToolkitService.java index 949b16745b17853e17028a8298e4168f3aeec96d..d7ea49151e7325d158f698f31030b8ccbcb6bae2 100644 --- a/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccToolkitService.java +++ b/source/Annex_D_UiccInterfaces/org/etsi/scp/wg3/uicc/jcapi/userinterface/UiccToolkitService.java @@ -16,6 +16,15 @@ public interface UiccToolkitService { */ public APDUResponse terminalProfileSession(String tpStr); + /** + * Perform Terminal Profile APDU command and all fetch/Terminal + * Response APDU until (90 00) status word. + * The test tool must not modify the Terminal Profile command. + * @param Terminal Profile command parameters, as String + * @return APDUResponse Object + */ + public APDUResponse terminalProfileSessionExact(String tpStr); + /** * perform a Terminal Profile APDU command * @param Terminal Profile command parameters, as String @@ -23,8 +32,19 @@ public interface UiccToolkitService { */ public APDUResponse terminalProfile(String tpStr); + /** + * Perform a Terminal Profile APDU command. + * The test tool must not modify the Terminal Profile command. + * @param Terminal Profile command parameters, as String + * @return APDUResponse Object + */ + public APDUResponse terminalProfileExact(String tpStr); + /** * perform a fetch APDU command + * This method shall check a) that there is a pending 91XX and b) that expDataLength == XX (from 91XX). + * If either of these checks fail, a Fail shall be reported. + * The value of Le for the Fetch command shall be XX (from 91XX) if available; otherwise expDataLength. * @param length of expected data, as String * @return APDUResponse Object */ @@ -224,4 +244,12 @@ public interface UiccToolkitService { * "D6 07 99 01 13 82 02 82 81" */ public APDUResponse envelopeEventDownloadHCIConnectivity(); + + /** + * perform an Envelope Event to trigger EVENT_PROACTIVE_HANDLER_AVAILABLE. + * @return APDUResponse Object + * Send the following string : + * FFS - define the value to be sent + */ + public APDUResponse envelopeEventProactiveHandlerAvailable(); } diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_cont/Test_Api_1_Cont.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_cont/Test_Api_1_Cont.java index d24ab7528f07b4692a64fa79e631ed681bab4898..a9446e08fce1091ccbdf00ae228fb8e6409df1ef 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_cont/Test_Api_1_Cont.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_cont/Test_Api_1_Cont.java @@ -464,7 +464,8 @@ public class Test_Api_1_Cont extends UiccTestModel { addResult(test.selectFile(EF_NOSH).checkSw("6985")); //5 - test.fetch("13"); + response = test.fetch("13"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030121 80820282 81830100"); /** test case 14 @@ -479,7 +480,8 @@ public class Test_Api_1_Cont extends UiccTestModel { addResult(test.selectFile(EF_NOSH).checkSw("6985")); //5 - test.fetch("13"); + response = test.fetch("13"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030121 80820282 81830100"); /** test case 15 diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_incr/Api_1_Fvw_Incr_1.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_incr/Api_1_Fvw_Incr_1.java index 7eb3ed328a49f5a8d9a96d6ff79c4fb6314cf3f6..be48837772b833f3dd1cbfb8e09bd678b16fae29 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_incr/Api_1_Fvw_Incr_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_incr/Api_1_Fvw_Incr_1.java @@ -32,15 +32,15 @@ public class Api_1_Fvw_Incr_1 extends TestToolkitApplet implements UICCConstants (byte)0x2F,(byte)0x06,(byte)0x01, // Value - Security attribute (EF Arr, record nb) (byte)0x80,(byte)0x02,(byte)0x00,(byte)0x00, // Tag, Length, value - File size (0 bytes => no record) (byte)0x88,(byte)0x00}; // Tag, Length - SFI (no SFI) - private byte [] abCreateEF_2CFD = { + private byte [] abCreateEF_2C7F = { (byte)0x82,(byte)0x04, // Tag, Length - File descriptor - (byte)0x46,(byte)0x21,(byte)0x00,(byte)0xFD, // Value - File descriptor (Cyclic) and record length (0xFD) + (byte)0x46,(byte)0x21,(byte)0x00,(byte)0x7F, // Value - File descriptor (Cyclic) and record length (0xF7) (byte)0x83,(byte)0x02, // Tag, Length - File Id - (byte)0x2C,(byte)0xFD, // Value - File Id + (byte)0x2C,(byte)0x7F, // Value - File Id (byte)0x8A,(byte)0x01,(byte)0x05, // Tag, Length, Value - LCSI (Activated) (byte)0x8B,(byte)0x03, // Tag, Length - Security attribute (byte)0x2F,(byte)0x06,(byte)0x01, // Value - Security attribute (EF Arr, record nb) - (byte)0x80,(byte)0x02,(byte)0x00,(byte)0xFD, // Tag, Length, value - File size (0 bytes => no record) + (byte)0x80,(byte)0x02,(byte)0x00,(byte)0x7F, // Tag, Length, value - File size (0 bytes => no record) (byte)0x88,(byte)0x00}; // Tag, Length - SFI (no SFI) byte testCaseNb = (byte) 0x00; byte incr[] = null; @@ -538,29 +538,28 @@ public class Api_1_Fvw_Incr_1 extends TestToolkitApplet implements UICCConstants testCaseNb = 16; try { - // Create EF 0x2CFD + // Create EF 0x2C7F incr = new byte[128]; - resp = new byte[0xFF]; + resp = new byte[127]; comp = new byte[0xFF]; - createEFCmd = HandlerBuilder.buildTLVHandler(HandlerBuilder.EDIT_HANDLER, (short)abCreateEF_2CFD.length, abCreateEF_2CFD, (short)0x00, (short)abCreateEF_2CFD.length); + createEFCmd = HandlerBuilder.buildTLVHandler(HandlerBuilder.EDIT_HANDLER, (short)abCreateEF_2C7F.length, abCreateEF_2C7F, (short)0x00, (short)abCreateEF_2C7F.length); UiccAdminFileView.createFile(createEFCmd); - UiccAdminFileView.select((short)0x2CFD); + UiccAdminFileView.select((short)0x2C7F); - Util.arrayFillNonAtomic(comp, (short)0, (short)126, (byte)0x00); - Util.arrayFillNonAtomic(comp, (short)126, (short)(0xFD-126), (byte)0xFF); - UiccAdminFileView.updateRecord((short)0, REC_ACC_MODE_PREVIOUS, (short)0, comp, (short)0, (short)0xFD); + Util.arrayFillNonAtomic(comp, (short)0, (short)127, (byte)0x00); + UiccAdminFileView.updateRecord((short)0, REC_ACC_MODE_PREVIOUS, (short)0, comp, (short)0, (short)0x7F); // increase Util.arrayFillNonAtomic(incr, (short)0, (short)incr.length, (byte)0); Util.arrayFillNonAtomic(resp, (short)0, (short)resp.length, (byte)0); - Util.arrayFillNonAtomic(comp, (short)0, (short)resp.length, (byte)0); + Util.arrayFillNonAtomic(comp, (short)0, (short)comp.length, (byte)0); incr[127] = (byte)0x01; - comp[125] = (byte)0x01; + comp[126] = (byte)0x01; incrOffset = 1; incrLength = 127; respOffset = 0; respLength = UiccAdminFileView.increase(incr, incrOffset, incrLength, resp, respOffset); // Check result - if ((respLength == (short)0xFD) && + if ((respLength == (short)0x7F) && (Util.arrayCompare(resp, (short)0, comp, (short)0, respLength) == 0)) bRes = true; else @@ -584,59 +583,6 @@ public class Api_1_Fvw_Incr_1 extends TestToolkitApplet implements UICCConstants bRes &= true; } reportTestOutcome(testCaseNb, bRes); - UiccAdminFileView.deleteFile((short)0x2CFD); + UiccAdminFileView.deleteFile((short)0x2C7F); } -} - -/* -testCaseNb = 16; -try -{ - // Create EF 0x2CFD - incr = new byte[128]; - resp = new byte[0xFF]; - comp = new byte[0xFF]; - createEFCmd = HandlerBuilder.buildTLVHandler(HandlerBuilder.EDIT_HANDLER, (short)abCreateEF.length, abCreateEF, (short)0x00, (short)abCreateEF.length); - UiccAdminFileView.createFile(createEFCmd); - UiccAdminFileView.select((short)0x2C7F); - - Util.arrayFillNonAtomic(comp, (short)0, (short)127, (byte)0xFF); - comp[0] = (byte)0x00; - UiccAdminFileView.updateRecord((short)0, REC_ACC_MODE_PREVIOUS, (short)0, comp, (short)0, (short)127); - // increase - Util.arrayFillNonAtomic(incr, (short)0, (short)incr.length, (byte)0); - Util.arrayFillNonAtomic(resp, (short)0, (short)resp.length, (byte)0); - Util.arrayFillNonAtomic(comp, (short)0, (short)resp.length, (byte)0); - incr[127] = (byte)0x01; - comp[0] = (byte)0x01; - incrOffset = 1; - incrLength = 127; - respOffset = 0; - respLength = UiccAdminFileView.increase(incr, incrOffset, incrLength, resp, respOffset); - // Check result - if ((respLength == (short)0x7F) && - (Util.arrayCompare(resp, (short)0, comp, (short)0, respLength) == 0)) - bRes = true; - else - bRes = false; -} -catch (Exception e) -{ - bRes = false; -} -try -{ - // increase - incrOffset = 0; - incrLength = 128; - respOffset = 0; - respLength = UiccAdminFileView.increase(incr, incrOffset, incrLength, resp, respOffset); - bRes = false; -} -catch (Exception e) -{ - bRes &= true; -} -reportTestOutcome(testCaseNb, bRes); -UiccAdminFileView.deleteFile((short)0x2C7F); -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Api_1_Fvw_Redb_1.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Api_1_Fvw_Redb_1.java index 65aa4dea14a5b773b247b0d89fc532d70a6e7b51..d839ba36bcc5d3d466907254eb46599e8c24c145 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Api_1_Fvw_Redb_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Api_1_Fvw_Redb_1.java @@ -17,9 +17,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.api_1_fvw_redb - * - * @version 0.0.1 - 6 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_1_Fvw_Redb_1 extends TestToolkitApplet implements UICCConstants diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Test_Api_1_Fvw_Redb.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Test_Api_1_Fvw_Redb.java index 4c3a0f4f1f44cc70a3a91ff22891e111b475aa78..69c2f7fc18e9101d20d70e6b39b96159c752cdf4 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Test_Api_1_Fvw_Redb.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redb/Test_Api_1_Fvw_Redb.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.api_1_fvw_redb - * - * @version 0.0.1 - 6 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_1_Fvw_Redb extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Api_1_Fvw_Redr_1.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Api_1_Fvw_Redr_1.java index ad54ebc7d727df41e6a6971300d21d941fadca60..293fc25d4b7eb321d00ba21305e6b56034da90e9 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Api_1_Fvw_Redr_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Api_1_Fvw_Redr_1.java @@ -17,9 +17,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.api_1_fvw_redr - * - * @version 0.0.1 - 6 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_1_Fvw_Redr_1 extends TestToolkitApplet implements UICCConstants { diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Test_Api_1_Fvw_Redr.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Test_Api_1_Fvw_Redr.java index b0cdabb6faa632088c74a0daf6ebf058bef84379..5eecec218f87f9ef98e00559e0eee9ed8817a1ba 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Test_Api_1_Fvw_Redr.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_redr/Test_Api_1_Fvw_Redr.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.api_1_fvw_redr - * - * @version 0.0.1 - 6 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_1_Fvw_Redr extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Api_1_Fvw_Updb_1.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Api_1_Fvw_Updb_1.java index b864414caa0df2e88d61859c67ed4fef9decd557..dce83265c318d734c8361fb0bd33db0712e9e757 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Api_1_Fvw_Updb_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Api_1_Fvw_Updb_1.java @@ -17,9 +17,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.api_1_fvw_updb - * - * @version 0.0.1 - 8 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_1_Fvw_Updb_1 extends TestToolkitApplet implements UICCConstants { diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Test_Api_1_Fvw_Updb.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Test_Api_1_Fvw_Updb.java index afa374200e5610b077600c4b8db68eda6a4361cc..f3cbd6a9df2731bccc1b0cb45b0666fdfae35e3b 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Test_Api_1_Fvw_Updb.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updb/Test_Api_1_Fvw_Updb.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.api_1_fvw_updb - * - * @version 0.0.1 - 8 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_1_Fvw_Updb extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Api_1_Fvw_Updr_1.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Api_1_Fvw_Updr_1.java index f294c3362773217a9aa51b9690c530c6ef9bada7..c7e9df7d0c85130102d4154de2e065b5f6ae5ec6 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Api_1_Fvw_Updr_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Api_1_Fvw_Updr_1.java @@ -17,9 +17,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.api_1_fvw_updr - * - * @version 0.0.1 - 8 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_1_Fvw_Updr_1 extends TestToolkitApplet implements UICCConstants { diff --git a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Test_Api_1_Fvw_Updr.java b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Test_Api_1_Fvw_Updr.java index c82c1a6f3ff404b4b53300645bfc364349ed1490..11a7775f368a5448ca3e2ef3a926781a735890a0 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Test_Api_1_Fvw_Updr.java +++ b/source/Annex_E_SourceCode/uicc/test/access/api_1_fvw_updr/Test_Api_1_Fvw_Updr.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.api_1_fvw_updr - * - * @version 0.0.1 - 8 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_1_Fvw_Updr extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Api_4_Afv_Redb_1.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Api_4_Afv_Redb_1.java index 6d93b75139cffc24cb0aeb8e21216994d1b9c30d..86573f0207e616775cb6d61589258f0938c435e4 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Api_4_Afv_Redb_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Api_4_Afv_Redb_1.java @@ -19,9 +19,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.fileadministration.api_4_afv_redb - * - * @version 0.0.1 - 6 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_4_Afv_Redb_1 extends TestToolkitApplet implements UICCConstants diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Test_Api_4_Afv_Redb.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Test_Api_4_Afv_Redb.java index 6a1723e57c9d9d084419c54a36877fd17e2c62eb..69f7e8e86b614a661b0ad12cc9fadc04abd3527d 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Test_Api_4_Afv_Redb.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redb/Test_Api_4_Afv_Redb.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.fileadministration.api_4_afv_redb - * - * @version 0.0.1 - 6 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_4_Afv_Redb extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Api_4_Afv_Redr_1.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Api_4_Afv_Redr_1.java index 8cd09eede5f436e492a62885d1c7ca53270d5047..080c7de0279f28565a78435147bbd18091f01e16 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Api_4_Afv_Redr_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Api_4_Afv_Redr_1.java @@ -19,9 +19,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.api_4_Afv_redr - * - * @version 0.0.1 - 6 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_4_Afv_Redr_1 extends TestToolkitApplet implements UICCConstants { diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Test_Api_4_Afv_Redr.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Test_Api_4_Afv_Redr.java index 1b83d6d6c664b9fcf785510432677c2fade59104..a688dfcd514586935d43eebe03b4c2c16af76fe6 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Test_Api_4_Afv_Redr.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_redr/Test_Api_4_Afv_Redr.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.fileadministration.api_4_afv_redr - * - * @version 0.0.1 - 6 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_4_Afv_Redr extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Api_4_Afv_Updb_1.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Api_4_Afv_Updb_1.java index 1bfc42015737c1bb0889ef2313d175e4ff17d58a..aa5675c2cb17ddb4fef2a67c0ba3ee8f8afc48d5 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Api_4_Afv_Updb_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Api_4_Afv_Updb_1.java @@ -19,9 +19,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.fileadministration.api_4_afv_updb - * - * @version 0.0.1 - 8 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_4_Afv_Updb_1 extends TestToolkitApplet implements UICCConstants { diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Test_Api_4_Afv_Updb.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Test_Api_4_Afv_Updb.java index d4f062f0f9ba64ac205ecd067777b87c34574000..5bf6738dba9a5b34833d15bd6292cc5991518a11 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Test_Api_4_Afv_Updb.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updb/Test_Api_4_Afv_Updb.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.fileadministration.api_4_afv_updb - * - * @version 0.0.1 - 8 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_4_Afv_Updb extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Api_4_Afv_Updr_1.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Api_4_Afv_Updr_1.java index 71525eed33a3fbfc12e74875208b2b985a668e4d..ca86d6a250c661c1ec11e537bbb9a93a49e29408 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Api_4_Afv_Updr_1.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Api_4_Afv_Updr_1.java @@ -19,9 +19,6 @@ import uicc.test.util.*; /** * Test Area : uicc.test.access.fileadministration.api_4_afv_updr - * - * @version 0.0.1 - 8 déc. 2005 - * @author 3GPP T3 SWG API */ public class Api_4_Afv_Updr_1 extends TestToolkitApplet implements UICCConstants { diff --git a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Test_Api_4_Afv_Updr.java b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Test_Api_4_Afv_Updr.java index 881a3a405758a3ab90817c135ccdf139477d5920..54ccb398e6312b01894d4d00c071b5ad40bf6777 100644 --- a/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Test_Api_4_Afv_Updr.java +++ b/source/Annex_E_SourceCode/uicc/test/access/fileadministration/api_4_afv_updr/Test_Api_4_Afv_Updr.java @@ -16,9 +16,6 @@ import org.etsi.scp.wg3.uicc.jcapi.userinterface.*; /** * Test Area : uicc.test.access.fileadministration.api_4_afv_updr - * - * @version 0.0.1 - 8 d�c. 2005 - * @author 3GPP T3 SWG API */ public class Test_Api_4_Afv_Updr extends UiccTestModel { diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_edat/Test_Cre_Apt_Edat.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_edat/Test_Cre_Apt_Edat.java index 7e0b4e8eb6ed29db5f9f7ab0113fc0d3042c96d0..d8c853dc866ac1d169b0806e7f5a7d4b848a694d 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_edat/Test_Cre_Apt_Edat.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_edat/Test_Cre_Apt_Edat.java @@ -55,13 +55,15 @@ public class Test_Cre_Apt_Edat extends UiccTestModel { //***TEST CASE 1: 1-APPLET 1 IS REGISTERED TO EVENT_EVENT_DOWNLOAD_ACCESS_TECHNOLOGY_CHANGE*** //***TEST CASE 1: 2-APPLET 1 IS TRIGGERED*** test.envelopeEventDownloadAccessTechnologyChange(); - test.fetch("0D"); + response = test.fetch("0D"); + addResult(response.checkSw("9000")); test.terminalResponse("81030105 00820282 81830100"); //***TEST CASE 2: 1-APPLET 1 IS NOT TRIGGERED*** test.envelopeEventDownloadAccessTechnologyChange(); //***TEST CASE 2: 1 IS REGISTERED TO EVENT_EVENT_DOWNLOAD_ACCESS_TECHNOLOGY_CHANGE*** test.envelopeMenuSelection("100101", "");//Help Request not available - test.fetch("0E"); + response = test.fetch("0E"); + addResult(response.checkSw("9000")); test.terminalResponse("81030105 00820282 81830100"); //***TEST CASE 2: 2-APPLET 1 IS TRIGGERED*** test.envelopeEventDownloadAccessTechnologyChange(); diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_efca/Test_Cre_Apt_Efca.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_efca/Test_Cre_Apt_Efca.java index 705bca8997b369c36b107ef6d5b554d5dc977228..c9f6c151aacedbbc82efb5a77aefec810cb9121b 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_efca/Test_Cre_Apt_Efca.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_efca/Test_Cre_Apt_Efca.java @@ -146,7 +146,7 @@ public class Test_Cre_Apt_Efca extends UiccTestModel { test.reset(); //***TEST CASE 4: 1-APPLET 5 IS TRIGGERED BY THE EVENT_FIRST_COMMAND_AFTER_ATR - response = test.terminalProfile("09010020 01"); + response = test.terminalProfile("09010020"); addResult(response.checkSw("911E")); //***TEST CASE 4: 1-APPLET 5 DISABLES A MENU ENTRY, THE FETCH OF SET UP MENU CONTAIN ONLY ONE ITEM response = test.fetch("1E"); diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_emsh/Test_Cre_Apt_Emsh.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_emsh/Test_Cre_Apt_Emsh.java index 85b367469bd22de03ec5c3e8df0821cdf5c26443..4a303a30a8ae7c0c1a82aef0e47027e24dec49da 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_emsh/Test_Cre_Apt_Emsh.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_emsh/Test_Cre_Apt_Emsh.java @@ -110,7 +110,7 @@ public class Test_Cre_Apt_Emsh extends UiccTestModel { "00" + // LV TAR Value(s) "00"); // V Maximum number of services test.reset(); - test.terminalProfile("09010020 01"); + test.terminalProfile("09010020"); //UICC proactive command SET UP MENU, Menu Entry ID 05, 06, 07, Help Request supported response = test.fetch("37"); addResult(response.checkData("D0358103 01258082 02818285 09554943" + diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_epha/Test_Cre_Apt_Epha.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_epha/Test_Cre_Apt_Epha.java index 313e3c69d75759c13f5b9bfeb54eadf4b4b6b908..42d79369be81c0d8ae30dc94c10caf6d1140ce9c 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_epha/Test_Cre_Apt_Epha.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_apt_epha/Test_Cre_Apt_Epha.java @@ -19,7 +19,6 @@ public class Test_Cre_Apt_Epha extends UiccTestModel { static final String APPLET_AID_1 = "A0000000 090005FF FFFFFF89 50010102"; static final String APPLET_AID_2 = "A0000000 090005FF FFFFFF89 50020102"; - static final String APPLET_AID_3 = "A0000000 090005FF FFFFFF89 50020103"; static final String Text1 = "54657874 31"; private UiccAPITestCardService test; @@ -34,7 +33,7 @@ public class Test_Cre_Apt_Epha extends UiccTestModel { initialiseResults(); /*********************************************************************/ - /** Testcase 1, 2 */ + /** Testcase 1, 2 */ /*********************************************************************/ @@ -103,72 +102,72 @@ public class Test_Cre_Apt_Epha extends UiccTestModel { test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE); test.deleteApplet(APPLET_AID_1); test.deleteApplet(APPLET_AID_2); - test.deletePackage(CAP_FILE_PATH); - - /*********************************************************************/ - /** Testcase 3 */ - /*********************************************************************/ - - // Install Applet1 - test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_3, - "8008" + // TLV UICC Toolkit application specific parameters - "01" + // V Priority Level - "00" + // V Max. number of timers - "0A" + // V Maximum text length for a menu entry - "00" + // V Maximum number of menu entries - "00" + // V Maximum number of channels - "00" + // LV Minimum Security Level field - "00" + // LV TAR Value(s) - "00"); // V Maximum number of services - - addResult(response.checkSw("9000")); - - // Install Applet2 - test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_3, - "8008" + // TLV UICC Toolkit application specific parameters - "01" + // V Priority Level - "00" + // V Max. number of timers - "0A" + // V Maximum text length for a menu entry - "00" + // V Maximum number of menu entries - "00" + // V Maximum number of channels - "00" + // LV Minimum Security Level field - "00" + // LV TAR Value(s) - "00"); // V Maximum number of services - - addResult(response.checkSw("9000")); - - // Card Initialisation - test.reset(); - test.terminalProfileSession("09030020 21"); - - // Trigger the applets - response = test.envelopeEventProactiveHandlerAvailable(); - addResult(response.checkSw("9000")); - - - /*********************************************************************/ - /*********************************************************************/ - /** Check Applets */ - /*********************************************************************/ - /*********************************************************************/ - - response = test.selectApplication(APPLET_AID_3); - addResult(response.checkData("10" + APPLET_AID_1 + "01" + "CC")); +// commented out Testcase 3, because envelopeEventProactiveHandlerAvailable() is currently FFS +// /*********************************************************************/ +// /** Testcase 3 */ +// /*********************************************************************/ +// +// // Install Applet1 +// response = test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, +// "8008" + // TLV UICC Toolkit application specific parameters +// "01" + // V Priority Level +// "00" + // V Max. number of timers +// "0A" + // V Maximum text length for a menu entry +// "00" + // V Maximum number of menu entries +// "00" + // V Maximum number of channels +// "00" + // LV Minimum Security Level field +// "00" + // LV TAR Value(s) +// "00"); // V Maximum number of services +// +// test.addResult(response.checkSw("9000")); +// +// // Install Applet2 +// response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, +// "8008" + // TLV UICC Toolkit application specific parameters +// "01" + // V Priority Level +// "00" + // V Max. number of timers +// "0A" + // V Maximum text length for a menu entry +// "00" + // V Maximum number of menu entries +// "00" + // V Maximum number of channels +// "00" + // LV Minimum Security Level field +// "00" + // LV TAR Value(s) +// "00"); // V Maximum number of services +// +// addResult(response.checkSw("9000")); +// +// // Card Initialisation +// test.reset(); +// test.terminalProfileSession("09030020 21"); +// +// // Trigger the applets +// response = test.envelopeEventProactiveHandlerAvailable(); +// addResult(response.checkSw("9000")); +// +// +// /*********************************************************************/ +// /*********************************************************************/ +// /** Check Applets */ +// /*********************************************************************/ +// /*********************************************************************/ +// +// response = test.selectApplication(APPLET_AID_1); +// addResult(response.checkData("10" + APPLET_AID_1 + "01" + "CC")); +// +// +// /*********************************************************************/ +// /*********************************************************************/ +// /** Restore card */ +// /*********************************************************************/ +// /*********************************************************************/ +// +// test.reset(); +// test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE); +// // delete applets and package +// test.deleteApplet(APPLET_AID_1); +// test.deleteApplet(APPLET_AID_2); + test.deletePackage(CAP_FILE_PATH); - /*********************************************************************/ - /*********************************************************************/ - /** Restore card */ - /*********************************************************************/ - /*********************************************************************/ - - test.reset(); - test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE); - // delete applets and package - test.deleteApplet(APPLET_AID_3); - test.deletePackage(CAP_FILE_PATH); - addResult(response.checkSw("9000")); - return getOverallResult(); } diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_enhd/Test_Cre_Mha_Enhd.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_enhd/Test_Cre_Mha_Enhd.java index 04e92547ae143db9caa63f14187784c58b233994..8f07ebfeae0da5583aacac6df06b4c022ed0a735 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_enhd/Test_Cre_Mha_Enhd.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_enhd/Test_Cre_Mha_Enhd.java @@ -32,14 +32,10 @@ public class Test_Cre_Mha_Enhd extends UiccTestModel { /** test applet 1 instance aid */ private static String APPLET_AID_3 = "A0000000 090005FF FFFFFF89 50030102"; - - /** */ private UiccAPITestCardService test = null; /** contains the response from the executed command */ private APDUResponse response = null; - /** stores the test result */ - private boolean testresult = false; /** @@ -52,6 +48,8 @@ public class Test_Cre_Mha_Enhd extends UiccTestModel { * Installs the applet, runs the tests and checks the test result. */ public boolean run(){ + initialiseResults(); + // test script test.reset(); test.terminalProfileSession("0301"); @@ -94,91 +92,86 @@ public class Test_Cre_Mha_Enhd extends UiccTestModel { response = test.terminalProfileSession("FFFFFFF FFEFF1FFF FF0000FF FF9FFFEF" + "03FF000 0007FE300 01"); response = test.envelopeMenuSelection("900102","9500"); - testresult = response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 4 response = test.envelopeMenuSelection("900101",""); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 5 response = test.envelopeTimerExpiration("A40101"); //TC 6 response = test.envelopeCallControlByNAA(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 7 response = test.envelopeEventDownloadMTCall(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 8 response = test.envelopeEventDownloadCallConnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 9 response = test.envelopeEventDownloadCallDisconnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 10 response = test.envelopeEventDownloadLocationStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 11 response = test.envelopeEventDownloadUserActivity(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 12 response = test.envelopeEventDownloadIdleScreenAvailable(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 13 response = test.envelopeEventDownloadCardReaderStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 14 response = test.envelopeEventDownloadLanguageSelection(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 15 response = test.envelopeEventDownloadBrowserTermination(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 16 response = test.status("00","0C","00"); - testresult &= response.checkSw("911A"); + addResult(response.checkSw("911A")); //TC 17 response = test.fetch("1A"); response = test.terminalResponse("81030140 01820282 8183010038 0281003502 " + "03003902 000A"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); response = test.envelopeEventDownloadDataAvailable("B8028100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 18 response = test.envelopeEventDownloadChannelStatus("B8028100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 19 response = test.unrecognizedEnvelope(); response = test.fetch("10");//fetch declare service + addResult(response.checkSw("9000")); //get the service record tlv from declare service command String servrectlv = getServiceRecordTLV(response.getData()); response = test.terminalResponse("81030147 0082028281 830100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 20 response = test.envelopeEventDownloadLocalConnection("C1040000FFFF"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 21 response = test.envelopeEventDownloadAccessTechnologyChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 22 response = test.envelopeEventDownloadDisplayParametersChanged(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 23 //envelope handler availability with //event proactive handler available //TC 24 APPLICATION DESELECT response = test.selectApplication ("A0000000 090005FF FFFFFF89 E0000002"); response = test.sendApdu ("00A4044C 10A00000 00090005 FFFFFFFF 89E00000 02"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 25 response = test.envelopeEventDownloadNetworkSearchModeChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 26 response = test.envelopeEventDownloadBrowsingStatus(); - testresult &= response.checkSw("9000"); - //TC 28 - response = test.envelopeEventDownloadFramesInformationChanged(); - testresult &= response.checkSw("9000"); - //TC 29 - response = test.envelopeEventDownloadHCIConnectivity(); - testresult &= response.checkSw("9000"); - //TC 27 + 2 + addResult(response.checkSw("9000")); + //TC 27 test.reset(); response = test.terminalProfileSession("FFFFFFF FFEFF1FFF FF0000FF FF9FFFEF" + "03FF000 0007FE300 01"); @@ -194,21 +187,31 @@ public class Test_Cre_Mha_Enhd extends UiccTestModel { "00" + // LV TAR Value(s) "00" ); // V Maximum number of services response = test.selectApplication(APPLET_AID_3); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); + //TC 28 + // reset, because Applet3 is now selected on channel 0, which we need to use for toolkit activity + test.reset(); + response = test.terminalProfileSession("FFFFFFF FFEFF1FFF FF0000FF FF9FFFEF" + + "03FF000 0007FE300 01"); + response = test.envelopeEventDownloadFramesInformationChanged(); + addResult(response.checkSw("9000")); + // TC 29 + response = test.envelopeEventDownloadHCIConnectivity(); + addResult(response.checkSw("9000")); //CHECK TEST RESULT response = test.selectApplication(APPLET_AID_1); - testresult &= response.checkData("10" +APPLET_AID_1 + + addResult(response.checkData("10" +APPLET_AID_1 + "1CCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCCCC CCCCCCCC CCCCCC"); + "CCCCCCCC CCCCCCCC CCCCCC CCCC")); response = test.selectApplication(APPLET_AID_2); - testresult &= response.checkData("10" +APPLET_AID_2 + - "13CCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCC CCCC"); + addResult(response.checkData("10" +APPLET_AID_2 + + "15CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ + "CCCCCCCC CCCC")); response = test.selectApplication(APPLET_AID_3); - testresult &= response.checkData("10" +APPLET_AID_3 + "01CC"); + addResult(response.checkData("10" +APPLET_AID_3 + "01CC")); // delete applet and package test.reset(); @@ -218,7 +221,7 @@ public class Test_Cre_Mha_Enhd extends UiccTestModel { test.deleteApplet(APPLET_AID_3); test.deletePackage(CAP_FILE_PATH); - return testresult; + return getOverallResult(); } /** @@ -243,10 +246,4 @@ public class Test_Cre_Mha_Enhd extends UiccTestModel { } - - - - - - } \ No newline at end of file diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_erhd/Test_Cre_Mha_Erhd.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_erhd/Test_Cre_Mha_Erhd.java index 47330013f08342e41d1d82d80c35f4418b0c0520..40dedc16bcfc35a44b70934d4a40649f1dc7649a 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_erhd/Test_Cre_Mha_Erhd.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_erhd/Test_Cre_Mha_Erhd.java @@ -1,4 +1,3 @@ - //----------------------------------------------------------------------------- //Test_Cre_Mha_Erhd.java //----------------------------------------------------------------------------- @@ -35,9 +34,6 @@ public class Test_Cre_Mha_Erhd extends UiccTestModel { private UiccAPITestCardService test = null; /** contains the response from the executed command */ private APDUResponse response = null; - /** stores the test result */ - private boolean testresult = false; - /** * */ @@ -48,7 +44,9 @@ public class Test_Cre_Mha_Erhd extends UiccTestModel { * Installs the applet, runs the tests and checks the test result. */ public boolean run(){ - // test script + initialiseResults(); + + // test script test.reset(); test.terminalProfileSession("16FF"); // Install Applet @@ -91,115 +89,111 @@ public class Test_Cre_Mha_Erhd extends UiccTestModel { "FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF " + "FFFF"); response = test.envelopeMenuSelection("900102","9500"); - testresult = response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 4 response = test.envelopeMenuSelection("900101",""); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 5 response = test.envelopeTimerExpiration("A40101"); //TC 6 response = test.envelopeEventDownloadMTCall(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 7 response = test.envelopeEventDownloadCallConnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 8 response = test.envelopeEventDownloadCallDisconnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 9 response = test.envelopeEventDownloadLocationStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 10 response = test.envelopeEventDownloadUserActivity(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 11 response = test.envelopeEventDownloadIdleScreenAvailable(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 12 response = test.envelopeEventDownloadCardReaderStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 13 response = test.envelopeEventDownloadLanguageSelection(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 14 response = test.envelopeEventDownloadBrowserTermination(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 15 response = test.status("00","0C","00"); - testresult &= response.checkSw("911A"); + addResult(response.checkSw("911A")); //TC 16 response = test.fetch("1A"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030140 01820282 8183010038 0281003502 " + "03003902 000A"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); response = test.envelopeEventDownloadDataAvailable("B8028100");//channel id 1 - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 17 response = test.envelopeEventDownloadChannelStatus("B8028100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 18 response = test.envelopeCallControlByNAA(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); response = test.envelopeCallControlByNAA(); - testresult &= response.checkSw("9110"); + addResult(response.checkSw("9110")); response = test.fetch("10"); - testresult &= response.checkData("D00E8103 01218082 0281028D 03040000"); - response = test.terminalResponse("81030110 00820282 81830100"); - testresult &= response.checkSw("9000"); + addResult(response.checkData("D00E8103 01218082 0281028D 03040000")); + response = test.terminalResponse("81030121 80820282 81830100"); + addResult(response.checkSw("9000")); //TC 19 response = test.unrecognizedEnvelope(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); response = test.unrecognizedEnvelope(); - testresult &= response.checkSw("9111"); + addResult(response.checkSw("9111")); response = test.fetch("11"); - testresult &= response.checkData("D00F8103 01218082 0281028D 0404010203"); - response = test.terminalResponse("81030110 00820282 81830100"); - testresult &= response.checkSw("9000"); + addResult(response.checkData("D00F8103 01218082 0281028D 0404010203")); + response = test.terminalResponse("81030121 80820282 81830100"); + addResult(response.checkSw("9000")); //TC 20 response = test.unrecognizedEnvelope(); - testresult &= response.checkSw("9114"); + addResult(response.checkSw("9114")); response = test.envelopeCallControlByNAA(); - testresult &= response.checkSw("9114"); + addResult(response.checkSw("9114")); response = test.fetch("14"); - testresult &= response.checkData("D0128103 01218082 0281028D 07045445 58542031"); + addResult(response.checkData("D0128103 01218082 0281028D 07045445 58542031")); response = test.terminalResponse("81030121 80820282 81030100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 21 response = test.unrecognizedEnvelope(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 22 response = test.envelopeEventDownloadAccessTechnologyChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 23 response = test.envelopeEventDownloadDisplayParametersChanged(); - testresult &= response.checkSw("9110"); + addResult(response.checkSw("9110")); //TC 24 //fetch declare service response = test.fetch("10");//fetch declare service + addResult(response.checkSw("9000")); //get the service record tlv from declare service command String servrectlv = getServiceRecordTLV(response.getData()); response = test.terminalResponse("81030147 0082028281 830100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 25 response = test.envelopeEventDownloadLocalConnection("C1040000FFFF"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 26 response = test.selectApplication ("A0000000 090005FF FFFFFF89 E0000002"); response = test.sendApdu ("00A4044C 10A00000 00090005 FFFFFFFF 89E00000 02"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 27 response = test.envelopeEventDownloadNetworkSearchModeChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 28 response = test.envelopeEventDownloadBrowsingStatus(); - testresult &= response.checkSw("9000"); - //TC 28 - response = test.envelopeEventDownloadFramesInformationChanged(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 29 - response = test.envelopeEventDownloadHCIConnectivity(); - testresult &= response.checkSw("9000"); - //TC 27 + 2 test.reset(); response = test.terminalProfileSession("13"); @@ -216,23 +210,30 @@ public class Test_Cre_Mha_Erhd extends UiccTestModel { "00" ); // V Maximum number of services response = test.selectApplication(APPLET_AID_3); -// test.reset(); -// response = test.terminalProfileSession("13"); + //TC 30 + // reset, because Applet3 is now selected on channel 0, which we need to use for toolkit activity + test.reset(); + response = test.terminalProfileSession("13"); + response = test.envelopeEventDownloadFramesInformationChanged(); + addResult(response.checkSw("9000")); + //TC 31 + response = test.envelopeEventDownloadHCIConnectivity(); + addResult(response.checkSw("9000")); //check results of the tests //test.reset(); response = test.selectApplication(APPLET_AID_1); - testresult &= response.checkData("10" +APPLET_AID_1 + + addResult(response.checkData("10" +APPLET_AID_1 + "1ECCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCCCC CCCCCCCC CCCCCCCC CC"); + "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCC")); response = test.selectApplication(APPLET_AID_2); - testresult &= response.checkData("10" +APPLET_AID_2 + - "02CCCC"); + addResult(response.checkData("10" +APPLET_AID_2 + + "02CCCC")); response = test.selectApplication(APPLET_AID_3); - testresult &= response.checkData("10" +APPLET_AID_3 + "01CC"); + addResult(response.checkData("10" +APPLET_AID_3 + "01CC")); // delete applet and package test.reset(); @@ -242,7 +243,7 @@ public class Test_Cre_Mha_Erhd extends UiccTestModel { test.deleteApplet(APPLET_AID_3); test.deletePackage(CAP_FILE_PATH); - return testresult; + return getOverallResult(); } diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_pahd/Test_Cre_Mha_Pahd.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_pahd/Test_Cre_Mha_Pahd.java index 945b5c401d91e7709b09d2995cc17fc013c10760..21d3e97764d0fe7d15228acd9cd6ac4c1bdb0596 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_pahd/Test_Cre_Mha_Pahd.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_pahd/Test_Cre_Mha_Pahd.java @@ -39,8 +39,6 @@ public class Test_Cre_Mha_Pahd extends UiccTestModel { private UiccAPITestCardService test = null; /** contains the response from the executed command */ private APDUResponse response = null; - /** stores the test result */ - private boolean testresult = false; public final byte[] AID_ADF1 = {(byte)0xA0, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x09, (byte)0x00, (byte)0x05, (byte)0xFF, @@ -59,7 +57,9 @@ public class Test_Cre_Mha_Pahd extends UiccTestModel { * Installs the applet, runs the tests and checks the test result. */ public boolean run(){ - // test script + initialiseResults(); + + // test script test.reset(); test.terminalProfileSession("0301"); @@ -101,84 +101,87 @@ public class Test_Cre_Mha_Pahd extends UiccTestModel { "FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF " + "FFFF"); response = test.envelopeMenuSelection("900102","9500"); - testresult = response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 4 response = test.envelopeMenuSelection("900101",""); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 5 response = test.envelopeTimerExpiration("A40101"); //TC 6 response = test.envelopeCallControlByNAA(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 7 response = test.envelopeEventDownloadMTCall(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 8 response = test.envelopeEventDownloadCallConnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 9 response = test.envelopeEventDownloadCallDisconnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 10 response = test.envelopeEventDownloadLocationStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 11 response = test.envelopeEventDownloadUserActivity(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 12 response = test.envelopeEventDownloadIdleScreenAvailable(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 13 response = test.envelopeEventDownloadCardReaderStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 14 response = test.envelopeEventDownloadLanguageSelection(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 15 response = test.envelopeEventDownloadBrowserTermination(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 16 response = test.status("00","0C","00"); - testresult &= response.checkSw("911A"); + addResult(response.checkSw("911A")); //TC 17 response = test.fetch("1A"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030140 01820282 8183010038 0281003502 " + "03003902 000A"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); response = test.envelopeEventDownloadDataAvailable("B8028100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 18 response = test.envelopeEventDownloadChannelStatus("B8028100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 19 response = test.unrecognizedEnvelope(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 20 response = test.envelopeEventDownloadAccessTechnologyChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 21 response = test.envelopeEventDownloadDisplayParametersChanged(); //fetch declare service response = test.fetch("10"); + addResult(response.checkSw("9000")); //get the service record tlv from declare service command String servrectlv = getServiceRecordTLV(response.getData()); response = test.terminalResponse("81030147 0082028281 830100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 22 response = test.envelopeEventDownloadLocalConnection(servrectlv); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 23 response = test.envelopeEventDownloadCallConnected(); //fetch display text response = test.fetch("14"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030121 80820282 81030100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 24 //- Select for activation ADF1 response = test.selectApplication (byteArrayToHexString(AID_ADF1)); //- Select for termination ADF1 response = test.sendApdu ("00A4044C 10"+byteArrayToHexString(AID_ADF1) ); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 25 test.reset(); //no terminal profile is sent and proactive handler shall not be available. @@ -215,28 +218,24 @@ public class Test_Cre_Mha_Pahd extends UiccTestModel { response = test.envelopeEventDownloadAccessTechnologyChange(); //TC 41 response = test.envelopeEventDownloadDisplayParametersChanged(); - //TC 49 - response = test.envelopeEventDownloadFramesInformationChanged(); - //TC 50 - response = test.envelopeEventDownloadHCIConnectivity(); //TC 42 //The Proactive Handler is not available before the //Terminal Profile //TC 43 - response = test.envelopeEventDownloadNetworkSearchModeChange(); - //TC 44 - response = test.envelopeEventDownloadBrowsingStatus(); - //TC 45 + 2 - test.reset(); + response = test.envelopeEventDownloadNetworkSearchModeChange(); + //TC 44 + response = test.envelopeEventDownloadBrowsingStatus(); + //TC 45 + test.reset(); //initialization with all the facilities supported (without SETUP_EVENT_LIST) response = test.terminalProfileSession("FFFFFFFF FEFFFFFF FFFFFFFF FFFFFFFF " + "FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF " + "FFFF"); response = test.envelopeEventDownloadNetworkSearchModeChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 46 response = test.envelopeEventDownloadBrowsingStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 47 test.reset(); // Install Applet @@ -255,6 +254,16 @@ public class Test_Cre_Mha_Pahd extends UiccTestModel { "00" + // LV TAR Value(s) "00" ); // V Maximum number of services response = test.selectApplication(APPLET_AID_3); + //TC 48 + // reset, because Applet3 is now selected on channel 0, which we need to use for toolkit activity + test.reset(); + //initialization with all the facilities supported (without SETUP_EVENT_LIST) + response = test.terminalProfileSession("FFFFFFFF FEFFFFFF FFFFFFFF FFFFFFFF " + + "FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF " + + "FFFF"); + response = test.envelopeEventDownloadFramesInformationChanged(); + //TC 49 + response = test.envelopeEventDownloadHCIConnectivity(); // get result from applets @@ -263,25 +272,25 @@ public class Test_Cre_Mha_Pahd extends UiccTestModel { // case that a CAT facility is not supported by the terminal profile, // the applet will not be triggered on an unsupported event. response = test.selectApplication(APPLET_AID_1); - testresult &= (response.checkData("10" +APPLET_AID_1 + - "2FCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCCCC CCCCCCCC CCCCCCCC CCCC") || + addResult(response.checkData("10" +APPLET_AID_1 + + "2FCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ + "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ + "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC") || response.checkData("10" +APPLET_AID_1 + "18CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC" + "CCCCCCCC CCCCCCCC CC") ); response = test.selectApplication(APPLET_AID_2); - testresult &= (response.checkData("10" +APPLET_AID_2 + - "22CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ + addResult(response.checkData("10" +APPLET_AID_2 + + "24CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCC") || + "CCCCCCCC CC") || response.checkData("10" +APPLET_AID_2 + "11CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC " + "CCCC") ); response = test.selectApplication(APPLET_AID_3); - testresult &= response.checkData("10" +APPLET_AID_3 + "01CC"); + addResult(response.checkData("10" +APPLET_AID_3 + "01CC")); // delete applet and package test.reset(); @@ -291,7 +300,7 @@ public class Test_Cre_Mha_Pahd extends UiccTestModel { test.deleteApplet(APPLET_AID_3); test.deletePackage(CAP_FILE_PATH); - return testresult; + return getOverallResult(); } /** diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_prhd/Test_Cre_Mha_Prhd.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_prhd/Test_Cre_Mha_Prhd.java index be5c4c59f2b2ad5173a564512fd4a904281be21a..35e9840d9517b05c3a591b8f8c025f91bab70146 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_prhd/Test_Cre_Mha_Prhd.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_mha_prhd/Test_Cre_Mha_Prhd.java @@ -38,8 +38,6 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { private UiccAPITestCardService test = null; /** contains the response from the executed command */ private APDUResponse response = null; - /** stores the test result */ - private boolean testresult = false; /** * @@ -51,6 +49,7 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { * Installs the applet, runs the tests and checks the test result. */ public boolean run(){ + initialiseResults(); // test script test.reset(); @@ -94,84 +93,87 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { "FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF " + "FFFF"); response = test.envelopeMenuSelection("900102","9500"); - testresult = response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 4 response = test.envelopeMenuSelection("900101",""); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 5 response = test.envelopeTimerExpiration("A40101"); //TC 6 response = test.envelopeCallControlByNAA(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 7 response = test.envelopeEventDownloadMTCall(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 8 response = test.envelopeEventDownloadCallConnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 9 response = test.envelopeEventDownloadCallDisconnected(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 10 response = test.envelopeEventDownloadLocationStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 11 response = test.envelopeEventDownloadUserActivity(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 12 response = test.envelopeEventDownloadIdleScreenAvailable(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 13 response = test.envelopeEventDownloadCardReaderStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 14 response = test.envelopeEventDownloadLanguageSelection(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 15 response = test.envelopeEventDownloadBrowserTermination(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 16 response = test.status("00","0C","00"); - testresult &= response.checkSw("911A"); + addResult(response.checkSw("911A")); //TC 17 response = test.fetch("1A"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030140 01820282 8183010038 0281003502 " + "03003902 000A"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); response = test.envelopeEventDownloadDataAvailable("B8028100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 18 response = test.envelopeEventDownloadChannelStatus("B8028100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 19 response = test.unrecognizedEnvelope(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 20 response = test.envelopeEventDownloadAccessTechnologyChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 21 response = test.envelopeEventDownloadDisplayParametersChanged(); //fetch declare service response = test.fetch("10"); + addResult(response.checkSw("9000")); //get the service record tlv from declare service command String servrectlv = getServiceRecordTLV(response.getData()); response = test.terminalResponse("81030147 0082028281 830100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 22 response = test.envelopeEventDownloadLocalConnection(servrectlv); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 23 response = test.envelopeEventDownloadCallConnected(); //fetch display text response = test.fetch("14"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030121 80820282 81030100"); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 24 //- Select for activation ADF1 response = test.selectApplication (AID_ADF1); //- Select for termination ADF1 response = test.sendApdu ("00A4044C 10"+AID_ADF1 ); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 25 test.reset(); //no terminal profile is sent and proactive handler shall not be available. @@ -208,10 +210,6 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { response = test.envelopeEventDownloadAccessTechnologyChange(); //TC 41 response = test.envelopeEventDownloadDisplayParametersChanged(); - //TC 48 - response = test.envelopeEventDownloadFramesInformationChanged(); - //TC 49 - response = test.envelopeEventDownloadHCIConnectivity(); //TC 42 //The Proactive Handler is not available before the //Terminal Profile @@ -226,10 +224,10 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { "FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF " + "FFFF"); response = test.envelopeEventDownloadNetworkSearchModeChange(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 46 response = test.envelopeEventDownloadBrowsingStatus(); - testresult &= response.checkSw("9000"); + addResult(response.checkSw("9000")); //TC 47 test.reset(); // Install Applet @@ -248,6 +246,16 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { "00" + // LV TAR Value(s) "00" ); // V Maximum number of services response = test.selectApplication(APPLET_AID_3); + //TC 48 + // reset, because Applet3 is now selected on channel 0, which we need to use for toolkit activity + test.reset(); + //initialization with all the facilities supported (without SETUP_EVENT_LIST) + response = test.terminalProfileSession("FFFFFFFF FEFFFFFF FFFFFFFF FFFFFFFF " + + "FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF " + + "FFFF"); + response = test.envelopeEventDownloadFramesInformationChanged(); + //TC 49 + response = test.envelopeEventDownloadHCIConnectivity(); // get result from applets @@ -257,10 +265,10 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { // case that a CAT facility is not supported by the terminal profile, // the applet will not be triggered on an unsupported event. response = test.selectApplication(APPLET_AID_1); - testresult &= (response.checkData("10" +APPLET_AID_1 + + addResult(response.checkData("10" +APPLET_AID_1 + "2FCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCCCC CCCCCCCC CCCCCCCC CCCC" + "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC" ) || response.checkData("10" +APPLET_AID_1 + "1CCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ @@ -269,20 +277,18 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { response = test.selectApplication(APPLET_AID_2); - testresult &= response.checkData("10" +APPLET_AID_2 + - "22CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ + addResult(response.checkData("10" +APPLET_AID_2 + + "24CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ "CCCCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ - "CCCCCC" - ) - || + "CCCCCCCC CC") || response.checkData("10" +APPLET_AID_2 + "15CCCCCC CCCCCCCC CCCCCCCC CCCCCCCC"+ "CCCCCCCC CCCC" - ); + )); response = test.selectApplication(APPLET_AID_3); - testresult &= response.checkData("10" +APPLET_AID_3 + "01CC"); + addResult(response.checkData("10" +APPLET_AID_3 + "01CC")); // delete applet and package test.reset(); @@ -292,7 +298,7 @@ public class Test_Cre_Mha_Prhd extends UiccTestModel { test.deleteApplet(APPLET_AID_3); test.deletePackage(CAP_FILE_PATH); - return testresult; + return getOverallResult(); } diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_pcs_spco/Test_Cre_Pcs_Spco.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_pcs_spco/Test_Cre_Pcs_Spco.java index b7cbf51537193b023a06b05724c0b3fa08afcd9c..75604b7ebaffb901652a130eb4b4cb3373595dbe 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_pcs_spco/Test_Cre_Pcs_Spco.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_pcs_spco/Test_Cre_Pcs_Spco.java @@ -210,6 +210,7 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { /** Testcase 2 */ /*********************************************************************/ + // note that we don't want this method to consume any unnecessary 91XX -> true test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -225,8 +226,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { "8104" + // TLV UICC Access application specific parameters "00" + // LV UICC File System AID field "0100" + // LV Access Domain for UICC file system = ALWAYS - "00" ); // LV Access Domain DAP field - + "00", // LV Access Domain DAP field + true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch the SetUpMenu with the menus menuList[0] = "Menu1"; menuIdList[0] = "01"; @@ -238,8 +241,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { /** Testcase 3 */ /*********************************************************************/ - // Lock Applet1 - test.lockApplication(APPLET_AID_1); + // Lock Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.lockApplication(APPLET_AID_1, true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch the SetUpMenu with the menus menuList[0] = "Menu2"; menuIdList[0] = "02"; @@ -250,8 +255,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { /** Testcase 4 */ /*********************************************************************/ - // Make selectable Applet1 - test.unlockApplication(APPLET_AID_1); + // Make selectable Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.unlockApplication(APPLET_AID_1, true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch the SetUpMenu with the menus menuList[0] = "Menu1"; menuIdList[0] = "01"; @@ -295,8 +302,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { /** Testcase 6 */ /*********************************************************************/ - // Lock Applet1 - test.lockApplication(APPLET_AID_1); + // Lock Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.lockApplication(APPLET_AID_1, true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch SetUpEventList command response = test.fetch("0D"); addResult(response.checkData("D00B8103 01050082 02818219 00") || @@ -309,8 +318,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { /** Testcase 7 */ /*********************************************************************/ - // Make selectable Applet1 - test.unlockApplication(APPLET_AID_1); + // Make selectable Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.unlockApplication(APPLET_AID_1, true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch SetUpEventList command response = test.fetch("0F"); addResult(response.checkData("D00D8103 01050082 02818219 020003") || @@ -359,8 +370,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { response = test.terminalResponse("81030105 00820282 81830100"); addResult(response.checkSw("9000")); - // Delete Applet1 - test.deleteApplet(APPLET_AID_1); + // Delete Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.deleteApplet(APPLET_AID_1, true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch SetUpEventList command response = test.fetch("0D"); addResult(response.checkData("D00B8103 01050082 02818219 00") || @@ -368,7 +381,7 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { response = test.terminalResponse("81030105 00820282 81830100"); addResult(response.checkSw("9000")); - // Install Applet1 + // Install Applet1; note that we don't want this method to consume any unnecessary 91XX -> true test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -380,7 +393,11 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); + // Send a Select command to be sure to retrieve the correct status word in the RAPDU + // Do not send Status, because this would turn off polling (which is coded for the start of Testcase12) + test.sendApdu("00 A4 00 0C 02 3F 00"); // Fetch SetUpEventList command response = test.fetch("0F"); addResult(response.checkData("D00D8103 01050082 02818219 020003") || @@ -411,8 +428,11 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { /** Testcase 10 */ /*********************************************************************/ - // Lock Applet1 - test.lockApplication(APPLET_AID_1); + // Lock Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.lockApplication(APPLET_AID_1, true); + // Send a Select command to be sure to retrieve the correct status word in the RAPDU + // Do not send Status, because this would turn off polling (which is coded for the start of Testcase12) + test.sendApdu("00 A4 00 0C 02 3F 00"); // Fetch Polling Off command response = test.fetch("0B"); addResult(response.checkData("D0098103 01040082 028182")); @@ -424,8 +444,11 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { /** Testcase 11 */ /*********************************************************************/ - // Make selectable Applet1 - test.unlockApplication(APPLET_AID_1); + // Make selectable Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.unlockApplication(APPLET_AID_1, true); + // Send a Select command to be sure to retrieve the correct status word in the RAPDU + // Do not send Status, because this would turn off polling (which is coded for the start of Testcase12) + test.sendApdu("00 A4 00 0C 02 3F 00"); // Fetch Poll Interval command response = test.fetch("0F"); addResult(response.checkData(pollInterCmd)); @@ -453,15 +476,17 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { response = test.terminalResponse("81030103 00820282 81830100 84020010"); addResult(response.checkSw("9000")); - // Delete Applet1 - test.deleteApplet(APPLET_AID_1); + // Delete Applet1; note that we don't want this method to consume any unnecessary 91XX -> true + test.deleteApplet(APPLET_AID_1, true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch Polling Off command response = test.fetch("0B"); addResult(response.checkData("D0098103 01040082 028182")); response = test.terminalResponse("81030104 00820282 81830100"); addResult(response.checkSw("9000")); - // Install Applet1 + // Install Applet1; note that we don't want this method to consume any unnecessary 91XX -> true test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -473,7 +498,11 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); + // Send a Select command to be sure to retrieve the correct status word in the RAPDU + // Do not send Status, because this would turn off polling (which is coded for the start of Testcase12) + test.sendApdu("00 A4 00 0C 02 3F 00"); // Fetch Poll Interval command response = test.fetch("0F"); addResult(response.checkData(pollInterCmd)); @@ -510,32 +539,61 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { "78743232")); response = test.terminalResponse("81030121 00820282 81830100"); - for (byte i = 0; i < 3; i++) - { - switch (Integer.valueOf(response.getStatusWord(),16).intValue()) - { - case 0x9118: - // Fetch an empty SetUpMenu - response = test.fetch("18"); - addResult(response.checkData("D0168103 01250082 02818285 09554943" + - "43205445 53548F00")); - response = test.terminalResponse("81030125 00820282 81830100"); - break; - case 0x910E: - response = test.fetch("0E"); - addResult(response.checkData("D00C8103 01050082 02818219 0103") || - response.checkData("D00C8103 01050082 02818299 0103")); - response = test.terminalResponse("81030105 00820282 81830100"); - break; - case 0x910B: - // Fetch Polling Off command - response = test.fetch("0B"); - addResult(response.checkData("D0098103 01040082 028182")); - response = test.terminalResponse("81030104 00820282 81830100"); - break; - default: + // local variables so that we detect each expected proactive command only once + boolean setUpMenuReceived = false; + boolean setUpEventListReceived = false; + boolean pollingOffReceived = false; + // loop three times to try to fetch the three expected proactive commands + for (byte i = 0; i < 3; i++) { + // check for a pending proactive command + if (response.getStatusWord().startsWith("91")) { + // fetch the proactive command + response = test.fetch(response.getStatusWord().substring(2)); + // find the command details (by searching for "8103"), so that we can extract the type of command + int commandDetailsIndex = response.getData().indexOf("8103"); + // if the proactive command is long enough to contain the type of command (it should be!) ... + if ((commandDetailsIndex > 0) && (response.getData().length() >= (commandDetailsIndex + 8))) { + // extract the type of command (3 bytes after the command details starts) + String typeOfCommand = response.getData().substring(commandDetailsIndex + 6, commandDetailsIndex + 8); + // check for the expected types (if not received already) + // 25: SET UP MENU + if (!setUpMenuReceived && typeOfCommand.equals("25")) { + addResult(response.checkData("D0168103 01250082 02818285 09554943" + + "43205445 53548F00")); + setUpMenuReceived = true; + } + // 05: SET UP EVENT LIST + else if (!setUpEventListReceived && typeOfCommand.equals("05")) { + addResult(response.checkData("D00C8103 01050082 02818219 0103") || + response.checkData("D00C8103 01050082 02818299 0103")); + setUpEventListReceived = true; + } + // 04: POLLING OFF + else if (!pollingOffReceived && typeOfCommand.equals("04")) { + addResult(response.checkData("D0098103 01040082 028182")); + pollingOffReceived = true; + } + // other + else { + addResult(false); + } + // send the terminal response + response = test.terminalResponse("810301" + typeOfCommand + " 00820282 81830100"); + } + else { + // the proactive command is too short for a type of command, so this is not an expected proactive command + addResult(false); + // return a dummy terminal response + response = test.terminalResponse("81030105 00820282 81830100"); + } + } + else { + // no proactive command; we always expect three proactive commands, so this is an error + // add number of failures corresponding to the number of missing proactive commands + for (int j = i; j < 3; j++) { addResult(false); - break; + } + break; } } @@ -657,10 +715,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { response = test.terminalResponse("81030125 00820282 81830100"); addResult(response.checkSw("9000")); - //Lock Applet3 (testcase 14-14) - response = test.lockApplication(APPLET_AID_3); + //Lock Applet3 (testcase 14-14); note that we don't want this method to consume any unnecessary 91XX -> true + test.lockApplication(APPLET_AID_3, true); // Send a status command to be sure to retrieve the correct status word in the RAPDU - response = test.status("00","0C","00"); + test.status("00","0C","00"); // Fetch the SetUpMenu response = test.fetch(response.getStatusWord().substring(2)); addResult(response.checkData("D01C8103 01250082 02818285 09554943" + @@ -674,8 +732,10 @@ public class Test_Cre_Pcs_Spco extends UiccTestModel { response = test.terminalResponse("81030125 00820282 81830100"); addResult(response.checkSw("9000")); - //Make selectable Applet3 (testcase 14-15) - test.unlockApplication(APPLET_AID_3); + //Make selectable Applet3 (testcase 14-15); note that we don't want this method to consume any unnecessary 91XX -> true + test.unlockApplication(APPLET_AID_3, true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch the SetUpMenu response = test.fetch("30"); addResult(response.checkData("D02E8103 01250082 02818285 09554943" + diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_reg_evtr/Test_Cre_Reg_Evtr.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_reg_evtr/Test_Cre_Reg_Evtr.java index 7c9b9e76980f5bb04ea0cef75000c646b7fca4be..00d0b4afb5776817abda9c104201e199d5e59ab9 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_reg_evtr/Test_Cre_Reg_Evtr.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_reg_evtr/Test_Cre_Reg_Evtr.java @@ -54,10 +54,10 @@ public class Test_Cre_Reg_Evtr extends UiccTestModel { "00" + // LV TAR Value(s) "00"); // V Maximum number of services - // test script - response = test.makeSelectableApplet(APPLET_AID_1); + // test script; note that we don't want this method to consume any unnecessary 91XX -> true + response = test.makeSelectableApplet(APPLET_AID_1, true); // Send a status command to be sure to retrieve the correct status word in the RAPDU - test.status("00", "0C", "00"); + response = test.status("00", "0C", "00"); addResult(response.checkSw("910F")); response = test.fetch("0F"); addResult(response.checkData("D00D8103 01050082 02818299 020004") || diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_chal/Test_Cre_Tin_Chal.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_chal/Test_Cre_Tin_Chal.java index e0b5427f690d364a267c6cd798c59e25b015ab80..62d5bd3d7beef9ddc9bc60d088359f649edaa2b0 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_chal/Test_Cre_Tin_Chal.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_chal/Test_Cre_Tin_Chal.java @@ -70,7 +70,7 @@ public class Test_Cre_Tin_Chal extends UiccTestModel { /** Testcase 2 */ /*********************************************************************/ - // Install Applet2 + // Install Applet2; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -82,13 +82,15 @@ public class Test_Cre_Tin_Chal extends UiccTestModel { "04" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00"); // V Maximum number of services + "00", // V Maximum number of services + true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); - addResult(response.checkSw("9000")); - // Fetch SetUpMenu - test.fetch("20"); + response = test.fetch("20"); + addResult(response.checkSw("9000")); test.terminalResponse("81030125 00820282 81830100"); @@ -116,7 +118,7 @@ public class Test_Cre_Tin_Chal extends UiccTestModel { /** Testcase 5 */ /*********************************************************************/ - // Install Applet3 + // Install Applet3; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_3, APPLET_AID_3, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -127,14 +129,16 @@ public class Test_Cre_Tin_Chal extends UiccTestModel { "03" + // V Position of menu entry 1 "07" + // V Maximum number of channels "00" + // LV Minimum Security Level field - "00" + // LV TAR Value(s) - "00"); // V Maximum number of services - - addResult(response.checkSw("9000")); + "00" + // LV TAR Value(s) + "00", // V Maximum number of services + true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch SetUpMenu - test.fetch("2A"); + response = test.fetch("2A"); + addResult(response.checkSw("9000")); test.terminalResponse("81030125 00820282 81830100"); diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itid/Test_Cre_Tin_Itid.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itid/Test_Cre_Tin_Itid.java index 0b3e9662d8f0a087548a8336860036cf54995476..9e0184af852034c68fe61350f9551a66ec600d48 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itid/Test_Cre_Tin_Itid.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itid/Test_Cre_Tin_Itid.java @@ -128,7 +128,7 @@ public class Test_Cre_Tin_Itid extends UiccTestModel { /** Testcase 4 */ /*********************************************************************/ - // Good Install Applet2 + // Good Install Applet2; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -140,7 +140,8 @@ public class Test_Cre_Tin_Itid extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -156,7 +157,7 @@ public class Test_Cre_Tin_Itid extends UiccTestModel { /** Testcase 4 */ /*********************************************************************/ - // Good Install Applet3 + // Good Install Applet3; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_3, APPLET_AID_3, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -168,7 +169,8 @@ public class Test_Cre_Tin_Itid extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -185,8 +187,8 @@ public class Test_Cre_Tin_Itid extends UiccTestModel { /** Testcase 5 */ /*********************************************************************/ - // Delete Applet2 - response = test.deleteApplet(APPLET_AID_2); + // Delete Applet2; note that we don't want this method to consume any unnecessary 91XX -> true + response = test.deleteApplet(APPLET_AID_2, true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -197,7 +199,7 @@ public class Test_Cre_Tin_Itid extends UiccTestModel { menuList[2] = "Menu31"; menuIdList[2] = "81"; fetchSetUpMenu("UICC TEST", null, (byte)3, menuIdList, menuList, null, null); - // Good Install Applet2 + // Good Install Applet2; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -209,7 +211,8 @@ public class Test_Cre_Tin_Itid extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itpo/Test_Cre_Tin_Itpo.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itpo/Test_Cre_Tin_Itpo.java index 6fef8713cf47e1aed15e88c760501685d9d93f62..a759cb993417d6162c8f1aae6967ee090389373a 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itpo/Test_Cre_Tin_Itpo.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_itpo/Test_Cre_Tin_Itpo.java @@ -51,7 +51,7 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 1 */ /*********************************************************************/ - // Install Applet1 + // Install Applet1; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, "8010" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -69,7 +69,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -86,7 +87,7 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 2 */ /*********************************************************************/ - // Install Applet2 + // Install Applet2; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -98,7 +99,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU @@ -117,7 +119,7 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 3 */ /*********************************************************************/ - // Install Applet3 + // Install Applet3; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_3, APPLET_AID_3, "800C" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -135,7 +137,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { "8104" + // TLV UICC Access application specific parameters "00" + // LV UICC File System AID field "0100" + // LV Access Domain for UICC file system = ALWAYS - "00" ); // LV Access Domain DAP field + "00", // LV Access Domain DAP field + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -155,7 +158,7 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 4 */ /*********************************************************************/ - // Install Applet4 + // Install Applet4; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_4, APPLET_AID_4, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -167,7 +170,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -188,7 +192,7 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 5 */ /*********************************************************************/ - // Install Applet5 + // Install Applet5; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_5, APPLET_AID_5, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -200,7 +204,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -236,8 +241,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { menuList[7] = "Menu51"; menuIdList[7] = "09"; fetchSetUpMenu("UICC TEST", null, (byte)8, menuIdList, menuList, null, null); - // Lock Applet2 - response = test.lockApplication(APPLET_AID_2); + // Lock Applet2; note that we don't want this method to consume any unnecessary 91XX -> true + response = test.lockApplication(APPLET_AID_2, true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); addResult(response.getStatusWord().substring(0,2).compareTo("91") == 0); @@ -256,7 +261,7 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 7 */ /*********************************************************************/ - // Install Applet6 + // Install Applet6; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_6, APPLET_AID_6, "800E" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -272,7 +277,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); @@ -312,8 +318,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { menuList[10] = "Menu63"; menuIdList[10] = "12"; fetchSetUpMenu("UICC TEST", null, (byte)11, menuIdList, menuList, null, null); - // Unlock Applet2 - response = test.unlockApplication(APPLET_AID_2); + // Unlock Applet2; note that we don't want this method to consume any unnecessary 91XX -> true + response = test.unlockApplication(APPLET_AID_2, true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); addResult(response.getStatusWord().substring(0,2).compareTo("91") == 0); @@ -337,8 +343,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 9 */ /*********************************************************************/ - // Delete Applet2 - response = test.deleteApplet(APPLET_AID_2); + // Delete Applet2; note that we don't want this method to consume any unnecessary 91XX -> true + response = test.deleteApplet(APPLET_AID_2, true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); addResult(response.getStatusWord().substring(0,2).compareTo("91") == 0); @@ -361,7 +367,7 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { /** Testcase 10 */ /*********************************************************************/ - // Install Applet2 + // Install Applet2; note that we don't want this method to consume any unnecessary 91XX -> true response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "800A" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -373,7 +379,8 @@ public class Test_Cre_Tin_Itpo extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services + "00", // V Maximum number of services + true); // Send a status command to be sure to retrieve the correct status word in the RAPDU response = test.status("00","0C","00"); diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_nbme/Test_Cre_Tin_Nbme.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_nbme/Test_Cre_Tin_Nbme.java index 0f50d477fba5723b1b72e2a9d13f846b9a925af0..dff3357ad5ad59d19b7c268cce827fe66e17ef1f 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_nbme/Test_Cre_Tin_Nbme.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_nbme/Test_Cre_Tin_Nbme.java @@ -47,7 +47,7 @@ public class Test_Cre_Tin_Nbme extends UiccTestModel { /** Testcase 1-2 */ /*********************************************************************/ - // Install Applet1 + // Install Applet1; note that we don't want this method to consume any unnecessary 91XX -> true test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, "800E" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level @@ -63,8 +63,10 @@ public class Test_Cre_Tin_Nbme extends UiccTestModel { "00" + // V Maximum number of channels "00" + // LV Minimum Security Level field "00" + // LV TAR Value(s) - "00" ); // V Maximum number of services - + "00", // V Maximum number of services + true); + // Send a status command to be sure to retrieve the correct status word in the RAPDU + test.status("00","0C","00"); // Fetch & Terminal response menuList[0] = "Menu1"; menuIdList[0] = "01"; menuList[1] = "Menu2"; menuIdList[1] = "02"; diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_tarv/Test_Cre_Tin_Tarv.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_tarv/Test_Cre_Tin_Tarv.java index 73f9da86fac1a53b3e69f4dee0e60b720ccc24ff..8aab5ee113ad6c74d2be5e7a5e772d20e0619ccc 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_tarv/Test_Cre_Tin_Tarv.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_tin_tarv/Test_Cre_Tin_Tarv.java @@ -41,7 +41,7 @@ public class Test_Cre_Tin_Tarv extends UiccTestModel { /** Testcase 1 */ /*********************************************************************/ - // Install Applet2 with TAR "020202� + // Install Applet2 with TAR "020202" response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "800B" + // TLV UICC Toolkit application specific parameters "FF" + // V Priority Level diff --git a/source/Annex_E_SourceCode/uicc/test/catre/cre_uta_adel/Test_Cre_Uta_Adel.java b/source/Annex_E_SourceCode/uicc/test/catre/cre_uta_adel/Test_Cre_Uta_Adel.java index 3ad4c4bf85fe63930c221e5d2c44408577a43029..670d9dd8532c325374eb7d01859697771aef4505 100644 --- a/source/Annex_E_SourceCode/uicc/test/catre/cre_uta_adel/Test_Cre_Uta_Adel.java +++ b/source/Annex_E_SourceCode/uicc/test/catre/cre_uta_adel/Test_Cre_Uta_Adel.java @@ -398,7 +398,7 @@ public class Test_Cre_Uta_Adel extends UiccTestModel { /*********************************************************************/ /** Testcase 5 */ /*********************************************************************/ - // Object owned by a deleted applet can�t be accessed by other applets + // Object owned by a deleted applet can't be accessed by other applets // 1- Delete AppletA1 diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_erh_post/Test_Api_2_Erh_Post.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_erh_post/Test_Api_2_Erh_Post.java index a38ceae25f23632842363d1d4c76678889bd1f24..8ec7c773bec304800595aef4d3ced6a98e756fa4 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_erh_post/Test_Api_2_Erh_Post.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_erh_post/Test_Api_2_Erh_Post.java @@ -116,6 +116,8 @@ public class Test_Api_2_Erh_Post extends UiccTestModel // Test case 5 response = test.unrecognizedEnvelope(); + addResult(response.checkSw("6200")); + response = test.envelopeEventDownloadUserActivity(); // Dummy command to get the 91XX status word addResult(response.checkSw("9115")); response = test.fetch("15"); addResult(response.checkData("D0138103 01218082 0281028D 08044150" diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_prh_cchd/Test_Api_2_Prh_Cchd.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_prh_cchd/Test_Api_2_Prh_Cchd.java index eec34f6116b77ed9744bcbfa56b36e87573f900e..c9316b2c8a2089c5704fda685ee33cac923a7783 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_prh_cchd/Test_Api_2_Prh_Cchd.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_prh_cchd/Test_Api_2_Prh_Cchd.java @@ -103,7 +103,7 @@ public class Test_Api_2_Prh_Cchd extends UiccTestModel // Fetch the received data proactive command response = test.fetch("0E"); addResult(response.checkData("D00C8103 01420182 02812137 0106")); - // Terminal Response with 6 bytes avalaible (�Hello1�) + // Terminal Response with 6 bytes avalaible ("Hello1") response = test.terminalResponse("81030142 01820282 81830100 36064865" + "6C6C6F31 370106"); addResult(response.checkSw("910E")); @@ -126,7 +126,7 @@ public class Test_Api_2_Prh_Cchd extends UiccTestModel // Fetch the received data proactive command response = test.fetch("0E"); addResult(response.checkData("D00C8103 01420182 02812137 0106")); - // Terminal Response with 6 bytes avalaible (�Hello2�) + // Terminal Response with 6 bytes avalaible ("Hello2") response = test.terminalResponse("81030142 01820282 81830100 36064865" + "6C6C6F32 370106"); addResult(response.checkSw("910E")); @@ -138,7 +138,7 @@ public class Test_Api_2_Prh_Cchd extends UiccTestModel // Fetch the received data proactive command response = test.fetch("0E"); addResult(response.checkData("D00C8103 01420182 02812137 010C")); - // Terminal Response with 12 bytes avalaible (�Hello3� & 'Hello4') + // Terminal Response with 12 bytes avalaible ("Hello3" & "Hello4") response = test.terminalResponse("81030142 01820282 81830100 36064865" + "6C6C6F33 36064865 6C6C6F34 37010C"); addResult(response.checkSw("9000")); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_chec_bss/Test_Api_2_Tep_Chec_Bss.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_chec_bss/Test_Api_2_Tep_Chec_Bss.java index 8a63d816f622a6708adfcf24111e6e4ffc4b2bb2..d7df2fda86a2892a8b32c88f5191044bd1364997 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_chec_bss/Test_Api_2_Tep_Chec_Bss.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_chec_bss/Test_Api_2_Tep_Chec_Bss.java @@ -58,7 +58,7 @@ public class Test_Api_2_Tep_Chec_Bss extends UiccTestModel { // test case 2 to 11 test.reset(); - test.terminalProfileSession("A977FFF1 FFFFFFFF FFFFFFFF FFFFFFFF"); + test.terminalProfileSessionExact("A977FFF1 FFFFFFFF FFFFFFFF FFFFFFFF"); response = test.unrecognizedEnvelope(); addResult(response.checkSw("9000")); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checb/Test_Api_2_Tep_Checb.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checb/Test_Api_2_Tep_Checb.java index 8eb3b175607802aa77f49c4eb6038df04eb11305..33d1c0bde612d7c36d9f1b9656fb525ca2bb007f 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checb/Test_Api_2_Tep_Checb.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checb/Test_Api_2_Tep_Checb.java @@ -58,7 +58,7 @@ public class Test_Api_2_Tep_Checb extends UiccTestModel { // test case 2 to 4 test.reset(); - test.terminalProfileSession("010160"); + test.terminalProfileSessionExact("010160"); response = test.unrecognizedEnvelope(); addResult(response.checkSw("9000")); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checs/Test_Api_2_Tep_Checs.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checs/Test_Api_2_Tep_Checs.java index 9b896707c6473a0aa95037438098b17a76ba33da..f6937789418c4cf867818263735441bd391baacd 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checs/Test_Api_2_Tep_Checs.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_checs/Test_Api_2_Tep_Checs.java @@ -57,7 +57,7 @@ public class Test_Api_2_Tep_Checs extends UiccTestModel { // test case 2 to 4 test.reset(); - test.terminalProfileSession("010160"); + test.terminalProfileSessionExact("010160"); response = test.unrecognizedEnvelope(); addResult(response.checkSw("9000")); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_copy/Test_Api_2_Tep_Copy.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_copy/Test_Api_2_Tep_Copy.java index 8193a0769a715b8c76a96d4bb2ecd7a447c28b36..ad653cc6908d2ad3540d8eb629eb231b1d942f11 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_copy/Test_Api_2_Tep_Copy.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_copy/Test_Api_2_Tep_Copy.java @@ -57,7 +57,7 @@ public class Test_Api_2_Tep_Copy extends UiccTestModel { // test cases 2 to 11 test.reset(); - test.terminalProfileSession("A901D2F0 01020000 00000000 008DFF"); + test.terminalProfileSessionExact("A901D2F0 01020000 00000000 008DFF"); response = test.unrecognizedEnvelope(); addResult(response.checkSw("9000")); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_gval/Test_Api_2_Tep_Gval.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_gval/Test_Api_2_Tep_Gval.java index 0d41570cb8f934e8f5dfe41486b39121689d08ed..d0cd2d7f34c7d172782e59c487b3bf8bdb249fae 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_gval/Test_Api_2_Tep_Gval.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tep_gval/Test_Api_2_Tep_Gval.java @@ -58,7 +58,7 @@ public class Test_Api_2_Tep_Gval extends UiccTestModel { // test case 2 to 9 test.reset(); - test.terminalProfileSession("A901D2F0 00000000 00000000 008DFF"); + test.terminalProfileSessionExact("A901D2F0 00000000 00000000 008DFF"); response = test.unrecognizedEnvelope(); addResult(response.checkSw("9000")); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_gpol/Test_Api_2_Tkr_Gpol.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_gpol/Test_Api_2_Tkr_Gpol.java index c51d3427b4457c0e6f07b0a76c90bf146125cbe1..d9d8b695a64fd5d68694889a5c744b4d1e5a1341 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_gpol/Test_Api_2_Tkr_Gpol.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_gpol/Test_Api_2_Tkr_Gpol.java @@ -60,11 +60,13 @@ public class Test_Api_2_Tkr_Gpol extends UiccTestModel { response = test.unrecognizedEnvelope(); addResult(response.checkSw("910F")); response = test.fetch("0F"); + addResult(response.checkSw("9000")); test.terminalResponse("81030103 00820282 81830100 840200FF"); test.reset(); response = test.terminalProfile("09017020"); addResult(response.checkSw("910F")); response = test.fetch("0F"); + addResult(response.checkSw("9000")); test.terminalResponse("81030103 00820282 81830100 840200FF"); test.unrecognizedEnvelope(); @@ -74,11 +76,13 @@ public class Test_Api_2_Tkr_Gpol extends UiccTestModel { response = test.unrecognizedEnvelope(); addResult(response.checkSw("910F")); response = test.fetch("0F"); + addResult(response.checkSw("9000")); test.terminalResponse("81030103 00820282 81830100 8402011E"); test.reset(); response = test.terminalProfile("09017020"); addResult(response.checkSw("910F")); response = test.fetch("0F"); + addResult(response.checkSw("9000")); test.terminalResponse("81030103 00820282 81830100 84020175"); test.unrecognizedEnvelope(); @@ -88,6 +92,7 @@ public class Test_Api_2_Tkr_Gpol extends UiccTestModel { response = test.unrecognizedEnvelope(); addResult(response.checkSw("910B")); response = test.fetch("0B"); + addResult(response.checkSw("9000")); test.terminalResponse("81030104 00820282 81830100"); test.reset(); response = test.terminalProfile("09017020"); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_rsid/Test_Api_2_Tkr_Rsid.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_rsid/Test_Api_2_Tkr_Rsid.java index 6de551d4607b355a980627c88109cdece8d0bf39..c57ae30498e75e5798fc32b9df4195e6421352ca 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_rsid/Test_Api_2_Tkr_Rsid.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_rsid/Test_Api_2_Tkr_Rsid.java @@ -76,6 +76,7 @@ public class Test_Api_2_Tkr_Rsid extends UiccTestModel { response = test.envelopeMenuSelection("900102",""); addResult(response.checkSw("9110")); response = test.fetch("10"); + addResult(response.checkSw("9000")); response = test.terminalResponse("81030147 00820282 81830100"); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_sevl/Test_Api_2_Tkr_Sevl.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_sevl/Test_Api_2_Tkr_Sevl.java index e024c318937ab86a95b0d9d21779acc145a5209c..a3ab2d0f3e7e1ca6163425482e1eaadf48d195dd 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_sevl/Test_Api_2_Tkr_Sevl.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_sevl/Test_Api_2_Tkr_Sevl.java @@ -82,6 +82,7 @@ public class Test_Api_2_Tkr_Sevl extends UiccTestModel { response = test.envelopeMenuSelection("900102", ""); addResult(response.checkSw("910E")); response = test.fetch("0E"); + addResult(response.checkSw("9000")); // check results response = test.selectApplication(APPLET_AID_1); diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_smta/Test_Api_2_Tkr_Smta.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_smta/Test_Api_2_Tkr_Smta.java index c23f47958bb0ece5f8e77a23db30adcbfa0680ae..7829d4b49ede84cba40b02e66cb57c36711c31da 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_smta/Test_Api_2_Tkr_Smta.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_tkr_smta/Test_Api_2_Tkr_Smta.java @@ -59,6 +59,7 @@ public class Test_Api_2_Tkr_Smta extends UiccTestModel { addResult(response.checkSw("913E")); response = test.fetch("3E"); + addResult(response.checkSw("9000")); test.terminalResponse("81030125 00820282 81830100"); // testcase 1 diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Api_2_Trs_IsPrAv_2.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Api_2_Trs_IsPrAv_2.java index 6abc35a16f13b1a06edbdd4ac738bafdca341024..4ecf45a7208fe393a9059dcc32f5e3543827729a 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Api_2_Trs_IsPrAv_2.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Api_2_Trs_IsPrAv_2.java @@ -33,11 +33,11 @@ public class Api_2_Trs_IsPrAv_2 extends TestToolkitApplet /** * Method called by the JCRE at the installation of the applet */ - public static void install(byte bArray[], short bOffset, byte bLength) + public static void install(byte bArray[], short bOffset, byte bLength) { // Create a new applet instance Api_2_Trs_IsPrAv_2 thisApplet = new Api_2_Trs_IsPrAv_2(); - + // Register the new applet instance to the JCRE thisApplet.register(bArray, (short)(bOffset+1), bArray[bOffset]); @@ -46,40 +46,53 @@ public class Api_2_Trs_IsPrAv_2 extends TestToolkitApplet // register instance with the EVENT_PROACTIVE_HANDLER_AVAILABLE event thisApplet.obReg.setEvent(EVENT_PROACTIVE_HANDLER_AVAILABLE); - } + } /** * Method called by the UICC CRE */ - public void processToolkit(short event) + public void processToolkit(short event) { - if (event == EVENT_PROACTIVE_HANDLER_AVAILABLE) - { - try{ - switch(bMyInstanceId){ + if (event == EVENT_PROACTIVE_HANDLER_AVAILABLE) { + + try { + switch (bMyInstanceId) { + // ----------------------------------------------------------------- + // Instance 1 execution, Priority Level 1 + // ----------------------------------------------------------------- + case (byte)1: - if ( ToolkitRegistrySystem.isPrioritizedProactiveHandlerAvailableEventSet() == false) { - reportTestOutcome((byte)1, true); - } - else { - reportTestOutcome((byte)1, false); - } - break; - case (byte)2: - if ( ToolkitRegistrySystem.isPrioritizedProactiveHandlerAvailableEventSet() == true ) { - reportTestOutcome((byte)1, true) ; - } - else { - reportTestOutcome((byte)1, false) ; - } - break; - default: reportTestOutcome ((byte)1, false); + if ( ToolkitRegistrySystem.isPrioritizedProactiveHandlerAvailableEventSet() == false) { + reportTestOutcome((byte)1, true) ; + } + else { + reportTestOutcome((byte)1, false) ; + } + break; + + // ----------------------------------------------------------------- + // Instance 2 execution, Priority Level 2 + // ----------------------------------------------------------------- + + case (byte)2: + if ( ToolkitRegistrySystem.isPrioritizedProactiveHandlerAvailableEventSet() == true ) { + reportTestOutcome((byte)1, true) ; + } + else { + reportTestOutcome((byte)1, false) ; + } + break; + + default: + reportTestOutcome ((byte)1, false); + break; + } } - catch(Exception e){ + catch (Exception e) { } - } + } } } diff --git a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Test_Api_2_Trs_IsPrAv.java b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Test_Api_2_Trs_IsPrAv.java index 1b7d1160bbd377c243297c22081ae6df8ece128a..26a32d861e90ab05b9a4cdcf2fa113ce87a72025 100644 --- a/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Test_Api_2_Trs_IsPrAv.java +++ b/source/Annex_E_SourceCode/uicc/test/toolkit/api_2_trs_isprav/Test_Api_2_Trs_IsPrAv.java @@ -12,11 +12,10 @@ import org.etsi.scp.wg3.uicc.jcapi.userclass.*; public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { static final String CAP_FILE_PATH = "uicc/test/toolkit/api_2_trs_isprav"; - static final String CLASS_AID_1 = "A0000000 090005FF FFFFFF89 50010001"; - static final String APPLET_AID_1 = "A0000000 090005FF FFFFFF89 50010102"; - static final String APPLET_AID_2 = "A0000000 090005FF FFFFFF89 50010202"; - static final String APPLET_AID_3 = "A0000000 090005FF FFFFFF89 50010302"; - static final String APPLET_AID_4 = "A0000000 090005FF FFFFFF89 50010402"; + static final String CLASS_AID_1 = "A0000000 090005FF FFFFFF89 20010001"; + static final String CLASS_AID_2 = "A0000000 090005FF FFFFFF89 20020001"; + static final String APPLET_AID_1 = "A0000000 090005FF FFFFFF89 20010102"; + static final String APPLET_AID_2 = "A0000000 090005FF FFFFFF89 20010202"; private UiccAPITestCardService test; APDUResponse response; @@ -42,7 +41,7 @@ public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { /*********************************************************************/ // Install Applet1 - test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, + response = test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, "8008" + // TLV UICC Toolkit application specific parameters "01" + // V Priority Level "00" + // V Max. number of timers @@ -56,7 +55,7 @@ public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { addResult(response.checkSw("9000")); // Install Applet2 - test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_2, + response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "8008" + // TLV UICC Toolkit application specific parameters "02" + // V Priority Level "00" + // V Max. number of timers @@ -98,10 +97,9 @@ public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { test.reset(); test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE); - // delete applets and package + // delete applets test.deleteApplet(APPLET_AID_1); test.deleteApplet(APPLET_AID_2); - test.deletePackage(CAP_FILE_PATH); addResult(response.checkSw("9000")); /*********************************************************************/ @@ -109,7 +107,7 @@ public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { /*********************************************************************/ // Install Applet1 - test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_3, + response = test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1, "8008" + // TLV UICC Toolkit application specific parameters "01" + // V Priority Level "00" + // V Max. number of timers @@ -123,7 +121,7 @@ public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { addResult(response.checkSw("9000")); // Install Applet2 - test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_4, + response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2, "8008" + // TLV UICC Toolkit application specific parameters "01" + // V Priority Level "00" + // V Max. number of timers @@ -151,9 +149,9 @@ public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { /*********************************************************************/ /*********************************************************************/ - response = test.selectApplication(APPLET_AID_3); + response = test.selectApplication(APPLET_AID_1); addResult(response.checkData("10" + APPLET_AID_1 + "01" + "CC")); - response = test.selectApplication(APPLET_AID_4); + response = test.selectApplication(APPLET_AID_2); addResult(response.checkData("10" + APPLET_AID_2 + "01" + "CC")); @@ -166,8 +164,8 @@ public class Test_Api_2_Trs_IsPrAv extends UiccTestModel { test.reset(); test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE); // delete applets and package - test.deleteApplet(APPLET_AID_3); - test.deleteApplet(APPLET_AID_4); + test.deleteApplet(APPLET_AID_1); + test.deleteApplet(APPLET_AID_2); test.deletePackage(CAP_FILE_PATH); addResult(response.checkSw("9000"));