mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
sm: Support generation of card-based ed25519 CSR.
* sm/call-agent.c (gpgsm_scd_pksign): Allow SHA512. Create proper S-expression for EdDSA signature. * sm/certreqgen.c (create_request): Force use of SHA512 when using a ed25519 key. * sm/misc.c (transform_sigval): Insert OID for ed25519. -- GnuPG-bug-id: 4013 Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
This commit is contained in:
parent
74e9b579ca
commit
3cbdf896e6
3 changed files with 19 additions and 4 deletions
|
@ -807,8 +807,10 @@ create_request (ctrl_t ctrl,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
string = get_parameter_value (para, pHASHALGO, 0);
|
||||
if (string)
|
||||
len = gcry_sexp_canon_len (public, 0, NULL, NULL);
|
||||
if (get_pk_algo_from_canon_sexp (public, len) == GCRY_PK_EDDSA)
|
||||
mdalgo = GCRY_MD_SHA512;
|
||||
else if ((string = get_parameter_value (para, pHASHALGO, 0)))
|
||||
mdalgo = gcry_md_map_name (string);
|
||||
else
|
||||
mdalgo = GCRY_MD_SHA256;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue