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

Commit 47da5989 authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge "Add PTS_SmpFailureCase 6 for invalid encryption key size GAP test case"

parents 43f85a74 42f10835
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,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;