javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModuleTests.java
equal
deleted
inserted
replaced
1044 "jar_path")); |
1044 "jar_path")); |
1045 assertTrue(false); |
1045 assertTrue(false); |
1046 } |
1046 } |
1047 catch (RuntimeSecurityException e) |
1047 catch (RuntimeSecurityException e) |
1048 { |
1048 { |
1049 assertTrue(e.getShortMessage().equals(securityErrorMessage.get(SecurityErrorMessage.JAR_TAMPERED, null)) |
1049 assertTrue(e.getShortMessage().equals(securityErrorMessage.get(SecurityErrorMessage.JAR_NOT_FOUND, null)) |
1050 && e.getDetailedMessage().equals(securityDetailedErrorMessage.get(SecurityDetailedErrorMessage.JAR_TAMPERED, null))); |
1050 && e.getDetailedMessage().equals(securityDetailedErrorMessage.get(SecurityDetailedErrorMessage.JAR_NOT_FOUND, null))); |
1051 } |
1051 } |
1052 // root not enabled |
1052 // root not enabled |
1053 try |
1053 try |
1054 { |
1054 { |
1055 authenticationModule.verifyMIDletSuiteAuthenticity(appUID, new AuthenticationStorageData( |
1055 authenticationModule.verifyMIDletSuiteAuthenticity(appUID, new AuthenticationStorageData( |
1103 entry.addAttribute(new StorageAttribute( |
1103 entry.addAttribute(new StorageAttribute( |
1104 StorageNames.ID, |
1104 StorageNames.ID, |
1105 appUID.getStringValue())); |
1105 appUID.getStringValue())); |
1106 entry.addAttribute(new StorageAttribute( |
1106 entry.addAttribute(new StorageAttribute( |
1107 StorageNames.NAME, |
1107 StorageNames.NAME, |
1108 "MIDlet-Operator-Allowed")); |
1108 "Nokia-MIDlet-Operator-Allowed")); |
1109 entry.addAttribute(new StorageAttribute( |
1109 entry.addAttribute(new StorageAttribute( |
1110 StorageNames.VALUE, |
1110 StorageNames.VALUE, |
1111 "123-45 456-789 000-000")); |
1111 "123-45 456-789 000-000")); |
1112 session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, entry); |
1112 session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, entry); |
1113 authenticationModule.verifyMIDletSuiteAuthenticity(appUID, new AuthenticationStorageData( |
1113 authenticationModule.verifyMIDletSuiteAuthenticity(appUID, new AuthenticationStorageData( |
1124 entry.addAttribute(new StorageAttribute( |
1124 entry.addAttribute(new StorageAttribute( |
1125 StorageNames.ID, |
1125 StorageNames.ID, |
1126 appUID.getStringValue())); |
1126 appUID.getStringValue())); |
1127 entry.addAttribute(new StorageAttribute( |
1127 entry.addAttribute(new StorageAttribute( |
1128 StorageNames.NAME, |
1128 StorageNames.NAME, |
1129 "MIDlet-Operator-Allowed")); |
1129 "Nokia-MIDlet-Operator-Allowed")); |
1130 entry.addAttribute(new StorageAttribute( |
1130 entry.addAttribute(new StorageAttribute( |
1131 StorageNames.VALUE, |
1131 StorageNames.VALUE, |
1132 "123-45")); |
1132 "123-45")); |
1133 session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, entry); |
1133 session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, entry); |
1134 authenticationModule.verifyMIDletSuiteAuthenticity(appUID, new AuthenticationStorageData( |
1134 authenticationModule.verifyMIDletSuiteAuthenticity(appUID, new AuthenticationStorageData( |
1145 entry.addAttribute(new StorageAttribute( |
1145 entry.addAttribute(new StorageAttribute( |
1146 StorageNames.ID, |
1146 StorageNames.ID, |
1147 appUID.getStringValue())); |
1147 appUID.getStringValue())); |
1148 entry.addAttribute(new StorageAttribute( |
1148 entry.addAttribute(new StorageAttribute( |
1149 StorageNames.NAME, |
1149 StorageNames.NAME, |
1150 "MIDlet-Operator-Allowed")); |
1150 "Nokia-MIDlet-Operator-Allowed")); |
1151 entry.addAttribute(new StorageAttribute( |
1151 entry.addAttribute(new StorageAttribute( |
1152 StorageNames.VALUE, |
1152 StorageNames.VALUE, |
1153 "123-45")); |
1153 "123-45")); |
1154 session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, entry); |
1154 session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, entry); |
1155 try |
1155 try |