mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpgsm: Some more ECC support backported.
* sm/certcheck.c (gpgsm_check_cert_sig): Map ECDSA OIDs. * sm/misc.c (transform_sigval): Add ECC support. -- GnuPG-bug-id: 6253
This commit is contained in:
parent
3f845c8de7
commit
266a6602f0
2 changed files with 94 additions and 25 deletions
|
@ -357,9 +357,19 @@ gpgsm_check_cert_sig (ksba_cert_t issuer_cert, ksba_cert_t cert)
|
|||
int use_pss = 0;
|
||||
unsigned int saltlen;
|
||||
|
||||
/* Note that we map the 4 algos which current Libgcrypt versions are
|
||||
* not aware of the OID. */
|
||||
algo = gcry_md_map_name ( (algoid=ksba_cert_get_digest_algo (cert)));
|
||||
if (!algo && algoid && !strcmp (algoid, "1.2.840.113549.1.1.10"))
|
||||
use_pss = 1;
|
||||
else if (!algo && algoid && !strcmp (algoid, "1.2.840.10045.4.3.1"))
|
||||
algo = GCRY_MD_SHA224; /* ecdsa-with-sha224 */
|
||||
else if (!algo && algoid && !strcmp (algoid, "1.2.840.10045.4.3.2"))
|
||||
algo = GCRY_MD_SHA256; /* ecdsa-with-sha256 */
|
||||
else if (!algo && algoid && !strcmp (algoid, "1.2.840.10045.4.3.3"))
|
||||
algo = GCRY_MD_SHA384; /* ecdsa-with-sha384 */
|
||||
else if (!algo && algoid && !strcmp (algoid, "1.2.840.10045.4.3.4"))
|
||||
algo = GCRY_MD_SHA512; /* ecdsa-with-sha512 */
|
||||
else if (!algo)
|
||||
{
|
||||
log_error ("unknown digest algorithm '%s' used certificate\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue