aboutsummaryrefslogtreecommitdiffstats
path: root/sm/verify.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-05-08 12:14:01 +0000
committerWerner Koch <[email protected]>2020-05-08 13:10:13 +0000
commit34b628db4618a8712536aea695f934b0286e7b18 (patch)
tree82106e8c2790717c34b7171ade109f6d0b46ed97 /sm/verify.c
parentsm: Improve readability of the data verification output. (diff)
downloadgnupg-34b628db4618a8712536aea695f934b0286e7b18.tar.gz
gnupg-34b628db4618a8712536aea695f934b0286e7b18.zip
sm: Cleanup the use of GCRY_PK_ECC and GCRY_PK_ECDSA.
* common/sexputil.c (pubkey_algo_to_string): New. * sm/certcheck.c (do_encode_md): Replace GCRY_PK_ECDSA by GCRY_PK_ECC. * sm/certreqgen-ui.c (check_keygrip): Add all ECC algorithms. * sm/gpgsm.c (our_pk_test_algo): Also allow EdDSA. * sm/verify.c (gpgsm_verify): Map ECC algo to ECDSA. Use new pubkey algo name function Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'sm/verify.c')
-rw-r--r--sm/verify.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sm/verify.c b/sm/verify.c
index ecc3a7c1f..69ba3bd4c 100644
--- a/sm/verify.c
+++ b/sm/verify.c
@@ -457,13 +457,17 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp)
pkfpr = gpgsm_get_fingerprint_hexstring (cert, GCRY_MD_SHA1);
pkalgostr = gpgsm_pubkey_algo_string (cert, NULL);
pkalgo = gpgsm_get_key_algo_info (cert, &nbits);
+ /* Remap the ECC algo to the algo we use. Note that EdDSA has
+ * already been mapped. */
+ if (pkalgo == GCRY_PK_ECC)
+ pkalgo = GCRY_PK_ECDSA;
/* Print infos about the signature. */
log_info (_("Signature made "));
if (*sigtime)
{
/* We take the freedom as noted in RFC3339 to use a space
- * instead of the :T" delimiter between date and time.. We
+ * instead of the "T" delimiter between date and time. We
* also append a separate UTC instead of a "Z" or "+00:00"
* suffix because that makes it clear to everyone what kind
* of time this is. */
@@ -477,7 +481,7 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp)
{
log_info (_("algorithm:"));
log_printf (" %s + %s",
- gcry_pk_algo_name (pkalgo),
+ pubkey_algo_to_string (pkalgo),
gcry_md_algo_name (sigval_hash_algo));
if (algo != sigval_hash_algo)
log_printf (" (%s)", gcry_md_algo_name (algo));