- checking description against the certificate is now done internally in libnpa, removed hash of certificate description from pace output

- importing terminal certificates to verify terminals signature
- fixed hex dump without sc_context


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@537 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2011-09-23 13:19:59 +00:00
parent 2a59a1806a
commit fd6a13263d
5 changed files with 83 additions and 38 deletions

View File

@@ -84,21 +84,18 @@ void _bin_log(sc_context_t *ctx, int type, const char *file, int line,
const char *func, const char *label, const u8 *data, size_t len,
FILE *f)
{
/* this is the maximum supported by sc_do_log_va */
/* Flawfinder: ignore */
char buf[1800];
if (data)
sc_hex_dump(ctx, SC_LOG_DEBUG_NORMAL, data, len, buf, sizeof buf);
else
buf[0] = 0;
if (!f) {
char buf[1800];
if (data)
sc_hex_dump(ctx, SC_LOG_DEBUG_NORMAL, data, len, buf, sizeof buf);
else
buf[0] = 0;
sc_do_log(ctx, type, file, line, func,
"\n%s (%u byte%s):\n%s",
label, len, len==1?"":"s", buf);
} else {
fprintf(f, "%s (%u byte%s):\n%s",
label, len, len==1?"":"s", buf);
label, len, len==1?"":"s", sc_dump_hex(data, len));
}
}