mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
sm/
* certcheck.c (do_encode_md): Support 160 bit ECDSA.
This commit is contained in:
parent
685b56a0d3
commit
4c48abebfe
@ -1,3 +1,7 @@
|
|||||||
|
2007-04-18 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* certcheck.c (do_encode_md): Support 160 bit ECDSA.
|
||||||
|
|
||||||
2007-04-13 Werner Koch <wk@g10code.com>
|
2007-04-13 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* call-agent.c (start_agent): Don't use log_error when using the
|
* call-agent.c (start_agent): Don't use log_error when using the
|
||||||
|
@ -44,7 +44,7 @@ do_encode_md (gcry_md_hd_t md, int algo, int pkalgo, unsigned int nbits,
|
|||||||
size_t nframe;
|
size_t nframe;
|
||||||
unsigned char *frame;
|
unsigned char *frame;
|
||||||
|
|
||||||
if (pkalgo == GCRY_PK_DSA)
|
if (pkalgo == GCRY_PK_DSA || pkalgo == GCRY_PK_ECDSA)
|
||||||
{
|
{
|
||||||
nframe = gcry_md_get_algo_dlen (algo);
|
nframe = gcry_md_get_algo_dlen (algo);
|
||||||
if (nframe != 20)
|
if (nframe != 20)
|
||||||
@ -143,6 +143,12 @@ pk_algo_from_sexp (gcry_sexp_t pkey)
|
|||||||
algo = GCRY_PK_RSA;
|
algo = GCRY_PK_RSA;
|
||||||
else if (n==3 && !memcmp (name, "dsa", 3))
|
else if (n==3 && !memcmp (name, "dsa", 3))
|
||||||
algo = GCRY_PK_DSA;
|
algo = GCRY_PK_DSA;
|
||||||
|
else if (n==5 && !memcmp (name, "ecdsa", 5))
|
||||||
|
algo = GCRY_PK_ECDSA;
|
||||||
|
/* Because this function is called only for verification we can
|
||||||
|
assume that ECC actually means ECDSA. */
|
||||||
|
else if (n==3 && !memcmp (name, "ecc", 3))
|
||||||
|
algo = GCRY_PK_ECDSA;
|
||||||
else if (n==13 && !memcmp (name, "ambiguous-rsa", 13))
|
else if (n==13 && !memcmp (name, "ambiguous-rsa", 13))
|
||||||
algo = GCRY_PK_RSA;
|
algo = GCRY_PK_RSA;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user