/packages/modules/Uwb/service/java/com/android/server/uwb/secure/iso7816/ |
D | StatusWord.java | 30 public final class StatusWord { class 32 public static final StatusWord SW_NO_ERROR = 33 new StatusWord(0x9000, "no error"); 35 public static final StatusWord SW_RESPONSE_BYTES_STILL_AVAILABLE = 36 new StatusWord(0x6100, "Response bytes still available"); 38 public static final StatusWord SW_WARNING_STATE_UNCHANGED = 39 new StatusWord(0x6200, "Warning: State unchanged"); 41 public static final StatusWord SW_CARD_MANAGER_LOCKED = 42 new StatusWord(0x6283, "Warning: Card Manager is locked"); 44 public static final StatusWord SW_WARNING_NO_INFO_GIVEN = [all …]
|
D | ResponseApdu.java | 18 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_APPLET_SELECT_FAILED; 19 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_CLA_NOT_SUPPORTED; 20 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_CONDITIONS_NOT_SATISFIED; 21 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_FILE_NOT_FOUND; 22 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_INCORRECT_P1P2; 23 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_INS_NOT_SUPPORTED; 24 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_NO_ERROR; 25 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_UNKNOWN_ERROR; 26 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_WRONG_DATA; 27 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_WRONG_LE; [all …]
|
D | CommandApdu.java | 75 private final ImmutableSet<StatusWord> mExpected; 98 StatusWord... exp) { in CommandApdu() 119 Preconditions.checkArgument(StatusWord.areAllKnown(mExpected)); in CommandApdu() 251 public ImmutableSet<StatusWord> getExpected() { in getExpected() 258 public boolean acceptsStatusWord(StatusWord actual) { in acceptsStatusWord() 266 return acceptsStatusWord(StatusWord.fromInt(response.getStatusWord())); in acceptsResponse() 372 @Nullable private StatusWord[] mExpected = null; 404 public Builder setExpected(Collection<StatusWord> expected) { in setExpected() 405 return setExpected(expected.toArray(new StatusWord[expected.size()])); in setExpected() 411 public Builder setExpected(StatusWord... expected) { in setExpected() [all …]
|
/packages/modules/Uwb/service/tests/src/com/android/server/uwb/secure/iso7816/ |
D | CommandApduTest.java | 40 StatusWord[] exp = {StatusWord.SW_NO_ERROR}; in testCommandApdu() 55 new CommandApdu(0, 1, 2, 3, new byte[65566], 255, false, StatusWord.SW_NO_ERROR); in testCommandApdu_InvalidLc() 61 new CommandApdu(0, 1, 2, 3, null, 65566, false, StatusWord.SW_NO_ERROR); in testCommandApdu_InvalidLe() 66 StatusWord[] exp = {StatusWord.SW_NO_ERROR}; in testGetEncoded_standard() 76 StatusWord[] exp = {StatusWord.SW_NO_ERROR}; in testGetEncoded_extended() 86 StatusWord[] errorNoError = in testExpected() 87 new StatusWord[] {StatusWord.SW_NO_ERROR, StatusWord.SW_DATA_NOT_FOUND}; in testExpected() 90 Set<StatusWord> noErrorSet = new HashSet<>(); in testExpected() 91 noErrorSet.add(StatusWord.SW_NO_ERROR); in testExpected() 94 Set<StatusWord> dataNotFoundSet = new HashSet<>(); in testExpected() [all …]
|
D | StatusWordTest.java | 36 StatusWord sw = StatusWord.fromInt(0x9000); in testFromInt_validStatusWord() 37 assertThat(sw).isEqualTo(StatusWord.SW_NO_ERROR); in testFromInt_validStatusWord() 42 byte[] actual = StatusWord.SW_NO_ERROR.toBytes(); in testToBytes_noError() 49 byte[] actual = StatusWord.fromInt(0xDEAD).toBytes(); in testToBytes_unknown() 59 StatusWord.fromInt(sw); in testFromInt_tooManyBits() 71 StatusWord.fromInt(sw); in testFromInt_goodNumberOfBits() 73 StatusWord.fromInt(0xffff); in testFromInt_goodNumberOfBits() 78 assertThat(StatusWord.fromInt(0x9000).isKnown()).isTrue(); in testIsKnown() 79 assertThat(StatusWord.SW_NO_ERROR.isKnown()).isTrue(); in testIsKnown() 80 assertThat(StatusWord.fromInt(0x1234).isKnown()).isFalse(); in testIsKnown() [all …]
|
/packages/modules/Uwb/service/java/com/android/server/uwb/secure/csml/ |
D | DeleteAdfCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 47 protected StatusWord[] getExpectedSw() { in getExpectedSw() 48 return new StatusWord[] { in getExpectedSw() 49 StatusWord.SW_NO_ERROR, in getExpectedSw() 50 StatusWord.SW_WARNING_STATE_UNCHANGED, // OID not found, in getExpectedSw() 51 StatusWord.SW_WRONG_LENGTH, in getExpectedSw() 52 StatusWord.SW_CONDITIONS_NOT_SATISFIED, in getExpectedSw() 53 StatusWord.SW_FUNCTION_NOT_SUPPORTED, in getExpectedSw() 54 StatusWord.SW_WRONG_DATA, in getExpectedSw() 55 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | PutDoCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 63 protected StatusWord[] getExpectedSw() { in getExpectedSw() 64 return new StatusWord[] { in getExpectedSw() 65 StatusWord.SW_NO_ERROR, in getExpectedSw() 66 StatusWord.SW_SECURITY_STATUS_NOT_SATISFIED, in getExpectedSw() 67 StatusWord.SW_WRONG_DATA, in getExpectedSw() 68 StatusWord.SW_NOT_ENOUGH_MEMORY, in getExpectedSw() 69 StatusWord.SW_NC_INCONSISTENT_WITH_TLV, in getExpectedSw() 70 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | SwapOutAdfCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 57 protected StatusWord[] getExpectedSw() { in getExpectedSw() 58 return new StatusWord[] { in getExpectedSw() 59 StatusWord.SW_NO_ERROR, in getExpectedSw() 60 StatusWord.SW_WRONG_LENGTH, in getExpectedSw() 61 StatusWord.SW_CONDITIONS_NOT_SATISFIED, in getExpectedSw() 62 StatusWord.SW_FILE_NOT_FOUND, in getExpectedSw() 63 StatusWord.SW_NOT_ENOUGH_MEMORY, in getExpectedSw() 64 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | SwapInAdfCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 67 protected StatusWord[] getExpectedSw() { in getExpectedSw() 68 return new StatusWord[] { in getExpectedSw() 69 StatusWord.SW_NO_ERROR, in getExpectedSw() 70 StatusWord.SW_WRONG_LENGTH, in getExpectedSw() 71 StatusWord.SW_CONDITIONS_NOT_SATISFIED, in getExpectedSw() 72 StatusWord.SW_FILE_NOT_FOUND, in getExpectedSw() 73 StatusWord.SW_NOT_ENOUGH_MEMORY, in getExpectedSw() 74 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | GetDoCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 61 protected StatusWord[] getExpectedSw() { in getExpectedSw() 62 return new StatusWord[] { in getExpectedSw() 63 StatusWord.SW_NO_ERROR, in getExpectedSw() 64 StatusWord.SW_SECURITY_STATUS_NOT_SATISFIED, in getExpectedSw() 65 StatusWord.SW_WRONG_DATA, in getExpectedSw() 66 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | TunnelCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 50 protected StatusWord[] getExpectedSw() { in getExpectedSw() 51 return new StatusWord[] { in getExpectedSw() 52 StatusWord.SW_NO_ERROR, in getExpectedSw() 53 StatusWord.SW_CONDITIONS_NOT_SATISFIED, in getExpectedSw() 54 StatusWord.SW_FUNCTION_NOT_SUPPORTED, in getExpectedSw() 55 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | DispatchCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 49 protected StatusWord[] getExpectedSw() { in getExpectedSw() 50 return new StatusWord[] { in getExpectedSw() 51 StatusWord.SW_NO_ERROR, in getExpectedSw() 52 StatusWord.SW_CONDITIONS_NOT_SATISFIED, in getExpectedSw() 53 StatusWord.SW_FUNCTION_NOT_SUPPORTED, in getExpectedSw() 54 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | GetLocalDataCommand.java | 21 import com.android.server.uwb.secure.iso7816.StatusWord; 75 protected StatusWord[] getExpectedSw() { in getExpectedSw() 76 return new StatusWord[] { in getExpectedSw() 77 StatusWord.SW_NO_ERROR, in getExpectedSw() 78 StatusWord.SW_SECURITY_STATUS_NOT_SATISFIED, in getExpectedSw() 79 StatusWord.SW_WRONG_DATA, in getExpectedSw() 80 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | SelectAdfCommand.java | 23 import com.android.server.uwb.secure.iso7816.StatusWord; 54 protected StatusWord[] getExpectedSw() { in getExpectedSw() 55 return new StatusWord[] { in getExpectedSw() 56 StatusWord.SW_NO_ERROR, in getExpectedSw() 57 StatusWord.SW_APPLET_SELECT_FAILED, in getExpectedSw() 58 StatusWord.SW_FILE_NOT_FOUND, in getExpectedSw() 59 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | InitiateTransactionCommand.java | 23 import com.android.server.uwb.secure.iso7816.StatusWord; 77 protected StatusWord[] getExpectedSw() { in getExpectedSw() 78 return new StatusWord[] { in getExpectedSw() 79 StatusWord.SW_NO_ERROR, in getExpectedSw() 80 StatusWord.SW_CONDITIONS_NOT_SATISFIED, in getExpectedSw() 81 StatusWord.SW_FUNCTION_NOT_SUPPORTED, in getExpectedSw() 82 StatusWord.SW_INCORRECT_P1P2 }; in getExpectedSw()
|
D | FiRaResponse.java | 18 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_NO_ERROR; 20 import com.android.server.uwb.secure.iso7816.StatusWord; 32 public final StatusWord statusWord; 35 this.statusWord = StatusWord.fromInt(sw); in FiRaResponse()
|
/packages/modules/Uwb/service/tests/src/com/android/server/uwb/secure/ |
D | SecureElementChannelTest.java | 31 import com.android.server.uwb.secure.iso7816.StatusWord; 110 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_CONDITIONS_NOT_SATISFIED)) in openChannel_swTemporarilyUnavailableOnFirstTwoAttempts_succeedsOnThirdTry() 111 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_CONDITIONS_NOT_SATISFIED)) in openChannel_swTemporarilyUnavailableOnFirstTwoAttempts_succeedsOnThirdTry() 112 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_NO_ERROR)); in openChannel_swTemporarilyUnavailableOnFirstTwoAttempts_succeedsOnThirdTry() 125 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_CONDITIONS_NOT_SATISFIED)) in openChannel_swTemporarilyUnavailableAndNoSpecificDiagnostic_succeedsOnThirdTry() 126 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_NO_SPECIFIC_DIAGNOSTIC)) in openChannel_swTemporarilyUnavailableAndNoSpecificDiagnostic_succeedsOnThirdTry() 127 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_NO_ERROR)); in openChannel_swTemporarilyUnavailableAndNoSpecificDiagnostic_succeedsOnThirdTry() 142 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_CONDITIONS_NOT_SATISFIED)) in transmit_swTemporarilyUnavailableOnFirstTwoAttempts_succeedsOnThirdTry() 143 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_CONDITIONS_NOT_SATISFIED)) in transmit_swTemporarilyUnavailableOnFirstTwoAttempts_succeedsOnThirdTry() 157 ResponseApdu.fromStatusWord(StatusWord.SW_CONDITIONS_NOT_SATISFIED); in openChannel_retriesExhausted_failure() [all …]
|
/packages/modules/Uwb/service/java/com/android/server/uwb/secure/ |
D | SecureElementChannel.java | 19 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_NO_ERROR; 20 import static com.android.server.uwb.secure.iso7816.StatusWord.SW_NO_SPECIFIC_DIAGNOSTIC; 31 import com.android.server.uwb.secure.iso7816.StatusWord; 45 private static final StatusWord SW_TEMPORARILY_UNAVAILABLE = 46 StatusWord.SW_CONDITIONS_NOT_SATISFIED; 115 if (responseApdu.getStatusWord() == StatusWord.SW_NO_ERROR.toInt()) { in openChannelWithResponse() 132 .contains(StatusWord.fromInt(responseApdu.getStatusWord())); in shouldRetryOpenChannel()
|
/packages/modules/Uwb/service/tests/src/com/android/server/uwb/secure/csml/ |
D | DispatchResponseTest.java | 22 import com.android.server.uwb.secure.iso7816.StatusWord; 39 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithTransactionSuccess() 52 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithTransactionError() 70 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithOutboundDataToRemote() 90 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithOutboundDataToHost() 115 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithAdfSelectedNotification() 141 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithSecureSessionEstablishedNotification() 168 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithSecureSessionEstablishedNotificationAndValidSessionId() 195 StatusWord.SW_NO_ERROR.toInt()); in validResponseWithRdsAvailableNotification() 211 ResponseApdu.fromStatusWord(StatusWord.SW_CONDITIONS_NOT_SATISFIED); in wrongStatusWord()
|
D | InitiateTransactionResponseTest.java | 22 import com.android.server.uwb.secure.iso7816.StatusWord; 40 StatusWord.SW_NO_ERROR.toInt()); in validResponse() 51 StatusWord.SW_NO_SPECIFIC_DIAGNOSTIC); in wrongStatusWord() 67 StatusWord.SW_NO_ERROR.toInt()); in wrongTopTag() 83 StatusWord.SW_NO_ERROR.toInt()); in wrongStatusValue() 97 StatusWord.SW_NO_ERROR.toInt()); in emptyOutboundData()
|
D | TunnelResponseTest.java | 22 import com.android.server.uwb.secure.iso7816.StatusWord; 35 dataTlv.toBytes(), StatusWord.SW_NO_ERROR.toInt()); in validResponseData() 46 StatusWord.SW_CONDITIONS_NOT_SATISFIED); in wrongStatusWord() 59 dataTlv.toBytes(), StatusWord.SW_NO_ERROR.toInt()); in wrongTopTag() 72 dataTlv.toBytes(), StatusWord.SW_NO_ERROR.toInt()); in wrongDataTag()
|
D | SwapInAdfResponseTest.java | 22 import com.android.server.uwb.secure.iso7816.StatusWord; 34 dataTlv.toBytes(), StatusWord.SW_NO_ERROR.toInt()); in validResponseData() 45 StatusWord.SW_CONDITIONS_NOT_SATISFIED); in wrongStatusWord() 57 dataTlv.toBytes(), StatusWord.SW_NO_ERROR.toInt()); in wrongDataTag()
|
D | PutDoResponseTest.java | 22 import com.android.server.uwb.secure.iso7816.StatusWord; 29 ResponseApdu responseApdu = ResponseApdu.fromStatusWord(StatusWord.SW_NO_ERROR); in successResponse() 38 ResponseApdu.fromStatusWord(StatusWord.SW_WARNING_STATE_UNCHANGED); in errorResponse()
|
D | SwapOutAdfResponseTest.java | 22 import com.android.server.uwb.secure.iso7816.StatusWord; 29 ResponseApdu responseApdu = ResponseApdu.fromStatusWord(StatusWord.SW_NO_ERROR); in successResponse() 38 ResponseApdu.fromStatusWord(StatusWord.SW_DATA_NOT_FOUND); in errorResponse()
|
/packages/modules/Uwb/service/tests/src/com/android/server/uwb/secure/omapi/ |
D | OmapiConnectionImplTest.java | 33 import com.android.server.uwb.secure.iso7816.StatusWord; 77 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_NO_ERROR).toByteArray()); in openChannel() 80 assertThat(selectResponse).isEqualTo(ResponseApdu.fromStatusWord(StatusWord.SW_NO_ERROR)); in openChannel() 95 .thenReturn(ResponseApdu.fromStatusWord(StatusWord.SW_NO_ERROR).toByteArray()); in openChannel2Times() 100 .isEqualTo(StatusWord.SW_NO_SPECIFIC_DIAGNOSTIC.toInt()); in openChannel2Times()
|