aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/crlcache.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-01-22 11:54:02 +0000
committerWerner Koch <[email protected]>2016-01-22 11:54:02 +0000
commit12c665b36cdc4b7189549698fc4cc1b3523b18f5 (patch)
treef13fb432aa615e00f3c104bfc9bd899bc1d06a13 /dirmngr/crlcache.c
parentdirmngr: Provide the keyserver pool name even if there is no CNAME. (diff)
downloadgnupg-12c665b36cdc4b7189549698fc4cc1b3523b18f5.tar.gz
gnupg-12c665b36cdc4b7189549698fc4cc1b3523b18f5.zip
dirmngr: Indicate that serial numbers are hexadecimal.
* dirmngr/misc.c (hexify_data): Add arg with_prefix. Adjust all callers. * dirmngr/crlcache.c (cache_isvalid): Print "0x" in front of the S/N. -- GnuPG-bug-id: 1147 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/crlcache.c')
-rw-r--r--dirmngr/crlcache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c
index 13d8a262d..25ce7a662 100644
--- a/dirmngr/crlcache.c
+++ b/dirmngr/crlcache.c
@@ -1345,12 +1345,13 @@ cache_isvalid (ctrl_t ctrl, const char *issuer_hash,
if (n != 16)
{
log_error (_("WARNING: invalid cache record length for S/N "));
+ log_printf ("0x");
log_printhex ("", sn, snlen);
}
else if (opt.verbose)
{
unsigned char record[16];
- char *tmp = hexify_data (sn, snlen);
+ char *tmp = hexify_data (sn, snlen, 1);
if (cdb_read (cdb, record, n, cdb_datapos (cdb)))
log_error (_("problem reading cache record for S/N %s: %s\n"),
@@ -1366,7 +1367,7 @@ cache_isvalid (ctrl_t ctrl, const char *issuer_hash,
{
if (opt.verbose)
{
- char *serialno = hexify_data (sn, snlen);
+ char *serialno = hexify_data (sn, snlen, 1);
log_info (_("S/N %s is valid, it is not listed in the CRL\n"),
serialno );
xfree (serialno);
@@ -2095,7 +2096,7 @@ crl_cache_insert (ctrl_t ctrl, const char *url, ksba_reader_t reader)
err = gpg_error (GPG_ERR_CHECKSUM);
goto leave;
}
- checksum = hexify_data (md5buf, 16);
+ checksum = hexify_data (md5buf, 16, 0);
}