Commit df51c496 authored by Dmitrii Zhuravlev's avatar Dmitrii Zhuravlev Committed by Sachin Agrawal

Fix ECDSA signature verification

Change-Id: Ib1b3769fc42143878d84f58830af1d3976409524
Signed-off-by: default avatarDmitrii Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3653Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarSachin Agrawal <sachin.agrawal@intel.com>
parent 110ae224
......@@ -631,8 +631,12 @@ dtls_ecdsa_verify_sig_hash(const unsigned char *pub_key_x,
memcpy(publicKey + 32, pub_key_y, 32);
// Copy the signature into a single buffer
memcpy(sign, result_r, 32);
memcpy(sign + 32, result_s, 32);
int i;
for (i = 0; i < 32; i++)
{
sign[i] = result_r[31 - i];
sign[i + 32] = result_s[31 - i];
}
return uECC_verify(publicKey, sign_hash, sign);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment