mirror of
https://github.com/polhenarejos/pico-fido.git
synced 2024-09-20 03:10:10 +00:00
Fix credential creation for ES512.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
05044b498d
commit
26148282e6
@ -262,6 +262,9 @@ int derive_key(const uint8_t *app_id,
|
||||
if (cinfo == NULL) {
|
||||
return 1;
|
||||
}
|
||||
if (cinfo->bit_size % 8 != 0) {
|
||||
outk[0] >>= 8 - (cinfo->bit_size % 8);
|
||||
}
|
||||
r = mbedtls_ecp_read_key(curve, key, outk, ceil((float) cinfo->bit_size / 8));
|
||||
mbedtls_platform_zeroize(outk, sizeof(outk));
|
||||
if (r != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user