Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42f10835 authored by Alice Kuo's avatar Alice Kuo
Browse files

Add PTS_SmpFailureCase 6 for invalid encryption key size GAP test case

Bug: 236688032
Test: GAP/SEC/SEM/BI-23-C pass
Change-Id: Ic3f615fb6719731c5341672877abb45d193078ea
parent 792d7f32
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ TRC_HID_DEV=2
#  SMP_PAIR_AUTH_FAIL = 3
#  SMP_CONFIRM_VALUE_ERR = 4
#  SMP_PAIR_NOT_SUPPORT = 5
#  SMP_ENC_KEY_SIZE = 6
#  SMP_PAIR_FAIL_UNKNOWN = 8
#  SMP_REPEATED_ATTEMPTS = 9
#  SMP_NUMERIC_COMPAR_FAIL = 12
+8 −0
Original line number Diff line number Diff line
@@ -544,6 +544,14 @@ void smp_proc_pair_cmd(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
  STREAM_TO_UINT8(p_cb->peer_i_key, p);
  STREAM_TO_UINT8(p_cb->peer_r_key, p);

  tSMP_STATUS reason = p_cb->cert_failure;
  if (reason == SMP_ENC_KEY_SIZE) {
    tSMP_INT_DATA smp_int_data;
    smp_int_data.status = reason;
    smp_sm_event(p_cb, SMP_AUTH_CMPL_EVT, &smp_int_data);
    return;
  }

  if (smp_command_has_invalid_parameters(p_cb)) {
    tSMP_INT_DATA smp_int_data;
    smp_int_data.status = SMP_INVALID_PARAMETERS;