mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common: Extend the openpgp_curve_to_oid function.
* common/openpgp-oid.c (openpgp_curve_to_oid): Add optional arg R_NBITS. Change all callers. -- In particular for ed25519 and cv25519 it is quite useful to have an ability to get the required algorithm.
This commit is contained in:
parent
113a8288b8
commit
24095101a5
9 changed files with 27 additions and 16 deletions
|
@ -632,7 +632,8 @@ current_card_status (ctrl_t ctrl, estream_t fp,
|
|||
if (info.key_attr[i].curve)
|
||||
{
|
||||
const char *oid;
|
||||
oid = openpgp_curve_to_oid (info.key_attr[i].curve, NULL);
|
||||
oid = openpgp_curve_to_oid (info.key_attr[i].curve,
|
||||
NULL, NULL);
|
||||
if (oid)
|
||||
curve_for_print = openpgp_oid_to_curve (oid, 0);
|
||||
}
|
||||
|
@ -1545,7 +1546,7 @@ ask_card_keyattr (int keyno, const struct key_attr *current)
|
|||
if (curve)
|
||||
{
|
||||
key_attr->algo = algo;
|
||||
oid_str = openpgp_curve_to_oid (curve, NULL);
|
||||
oid_str = openpgp_curve_to_oid (curve, NULL, NULL);
|
||||
key_attr->curve = openpgp_oid_to_curve (oid_str, 0);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue