mirror of
https://github.com/LedgerHQ/openpgp-card-app
synced 2024-11-09 07:10:30 +00:00
fix nistp256 template
This commit is contained in:
parent
7205e9dcb5
commit
69532fde5a
@ -621,7 +621,7 @@ void ui_menu_tmpl_set_action(unsigned int value) {
|
||||
attributes.value[0] = KEY_ID_ECDSA;
|
||||
}
|
||||
oid = gpg_curve2oid(G_gpg_vstate.ux_type, &oid_len);
|
||||
memmove(attributes.value + 1, oid, sizeof(oid_len));
|
||||
memmove(attributes.value + 1, oid, oid_len);
|
||||
attributes.length = 1 + oid_len;
|
||||
break;
|
||||
|
||||
|
@ -607,13 +607,16 @@ void ui_menu_tmpl_set_action(unsigned int value) {
|
||||
break;
|
||||
|
||||
case CX_CURVE_SECP256R1:
|
||||
oid = gpg_curve2oid(G_gpg_vstate.ux_type, &oid_len);
|
||||
if (oid == NULL) {
|
||||
break;
|
||||
}
|
||||
if (G_gpg_vstate.ux_key == 2) {
|
||||
attributes.value[0] = KEY_ID_ECDH;
|
||||
} else {
|
||||
attributes.value[0] = KEY_ID_ECDSA;
|
||||
}
|
||||
oid = gpg_curve2oid(G_gpg_vstate.ux_type, &oid_len);
|
||||
memmove(attributes.value + 1, oid, sizeof(oid_len));
|
||||
memmove(attributes.value + 1, oid, oid_len);
|
||||
attributes.length = 1 + oid_len;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user