diff --git a/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp b/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp index f861ff95e9d598f9b177ed7872a385700f32f267..564703c7423d00bcf955e9bc09bfcca5eb2529d6 100644 --- a/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp +++ b/services/implementation/src/authentication_v2/auth_stages/auth_confirm.cpp @@ -722,7 +722,7 @@ int32_t AuthSinkConfirmState::ProcessBindAuthorize(std::shared_ptrconfirmOperation == USER_OPERATION_TYPE_CANCEL_AUTH) { LOGE("AuthSinkConfirmState::Action USER_OPERATION_TYPE_CANCEL_AUTH"); - context->reason = ERR_DM_BIND_USER_CANCEL; + context->reason = ERR_DM_AUTH_PEER_REJECT; return ERR_DM_FAILED; } context->authMessageProcessor->CreateAndSendMsg(MSG_TYPE_RESP_USER_CONFIRM, context); diff --git a/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp b/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp index af1d2ed5a09654da93fcb1e510d0ec7d89fa6ef5..913e6cd117655c1a3789eaa0c8bbc73f315ecbcd 100644 --- a/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp +++ b/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp @@ -351,8 +351,8 @@ int32_t AuthSrcPinNegotiateStartState::NegotiatePinAuth(std::shared_ptrcurrentAuthTypeIdx + 1 >= context->authTypeList.size()) { LOGE("all auth type failed"); - context->reason = ERR_DM_AUTH_REJECT; - return ERR_DM_AUTH_REJECT; + context->reason = ERR_DM_BIND_PIN_CODE_ERROR; + return ERR_DM_BIND_PIN_CODE_ERROR; } context->currentAuthTypeIdx++; context->authType = context->authTypeList[context->currentAuthTypeIdx]; @@ -554,8 +554,8 @@ int32_t AuthSinkPinNegotiateStartState::Action(std::shared_ptr co auto idx = context->currentAuthTypeIdx; if (idx + 1 >= context->authTypeList.size()) { LOGE("AuthSinkPinNegotiateStartState::Action all auth type failed"); - context->reason = ERR_DM_AUTH_REJECT; - return ERR_DM_AUTH_REJECT; + context->reason = ERR_DM_BIND_PIN_CODE_ERROR; + return ERR_DM_BIND_PIN_CODE_ERROR; } ++idx; context->currentAuthTypeIdx = idx; diff --git a/test/unittest/UTTest_auth_pin_auth_state.cpp b/test/unittest/UTTest_auth_pin_auth_state.cpp index 0b1b948940dc72c4fc042e99e6cd54a924439f84..6ec32b49ceee47a44ea9ee71e7a2aa01f0895e22 100644 --- a/test/unittest/UTTest_auth_pin_auth_state.cpp +++ b/test/unittest/UTTest_auth_pin_auth_state.cpp @@ -1196,7 +1196,7 @@ HWTEST_F(AuthPinAuthStateTest, AuthSrcPinNegotiateStartState_010, testing::ext:: context->direction = DmAuthDirection::DM_AUTH_SOURCE; context->pinNegotiateStarted = true; context->needBind = true; - EXPECT_EQ(authState->Action(context), ERR_DM_AUTH_REJECT); + EXPECT_EQ(authState->Action(context), ERR_DM_BIND_PIN_CODE_ERROR); } HWTEST_F(AuthPinAuthStateTest, AuthSrcPinInputState_001, testing::ext::TestSize.Level1) @@ -1276,7 +1276,7 @@ HWTEST_F(AuthPinAuthStateTest, AuthSinkPinNegotiateStartState_004, testing::ext: EXPECT_EQ(authState->Action(context), DM_OK); EXPECT_EQ(context->pinNegotiateStarted, true); - EXPECT_EQ(authState->Action(context), ERR_DM_AUTH_REJECT); + EXPECT_EQ(authState->Action(context), ERR_DM_BIND_PIN_CODE_ERROR); } HWTEST_F(AuthPinAuthStateTest, AuthSinkPinNegotiateStartState_005, testing::ext::TestSize.Level1)