mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-12 18:04:39 +08:00
Fix peer user mismatch after rebase
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
8b429ba414
commit
f309d6b7fb
@ -7400,7 +7400,7 @@ psa_status_t psa_pake_set_user(
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (operation->data.inputs.peer_len != 0) {
|
if (operation->data.inputs.user_len != 0) {
|
||||||
status = PSA_ERROR_BAD_STATE;
|
status = PSA_ERROR_BAD_STATE;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -7412,14 +7412,14 @@ psa_status_t psa_pake_set_user(
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
operation->data.inputs.peer = mbedtls_calloc(1, peer_id_len);
|
operation->data.inputs.user = mbedtls_calloc(1, user_id_len);
|
||||||
if (operation->data.inputs.peer == NULL) {
|
if (operation->data.inputs.user == NULL) {
|
||||||
status = PSA_ERROR_INSUFFICIENT_MEMORY;
|
status = PSA_ERROR_INSUFFICIENT_MEMORY;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(operation->data.inputs.peer, peer_id, peer_id_len);
|
memcpy(operation->data.inputs.user, user_id, user_id_len);
|
||||||
operation->data.inputs.peer_len = peer_id_len;
|
operation->data.inputs.user_len = user_id_len;
|
||||||
|
|
||||||
return PSA_SUCCESS;
|
return PSA_SUCCESS;
|
||||||
exit:
|
exit:
|
||||||
@ -7444,7 +7444,7 @@ psa_status_t psa_pake_set_peer(
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (operation->data.inputs.user_len != 0) {
|
if (operation->data.inputs.peer_len != 0) {
|
||||||
status = PSA_ERROR_BAD_STATE;
|
status = PSA_ERROR_BAD_STATE;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -7456,14 +7456,14 @@ psa_status_t psa_pake_set_peer(
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
operation->data.inputs.user = mbedtls_calloc(1, user_id_len);
|
operation->data.inputs.peer = mbedtls_calloc(1, peer_id_len);
|
||||||
if (operation->data.inputs.user == NULL) {
|
if (operation->data.inputs.peer == NULL) {
|
||||||
status = PSA_ERROR_INSUFFICIENT_MEMORY;
|
status = PSA_ERROR_INSUFFICIENT_MEMORY;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(operation->data.inputs.user, user_id, user_id_len);
|
memcpy(operation->data.inputs.peer, peer_id, peer_id_len);
|
||||||
operation->data.inputs.user_len = user_id_len;
|
operation->data.inputs.peer_len = peer_id_len;
|
||||||
|
|
||||||
return PSA_SUCCESS;
|
return PSA_SUCCESS;
|
||||||
exit:
|
exit:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user