- Fixed error when testing pace without card

- Testing pace allows now to choose the type of the secret (mrz, pin, can, puk).
  The secret can be given as commandline option or interactively.
- Cleaned prompt for getting the password
- Fixed error when inserting an empty password
- When PACE is successfully finished, APDUs for testing can be given
  interactively


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@73 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-04-15 07:37:32 +00:00
parent b798a6e3a2
commit 35f75abe1d
8 changed files with 248 additions and 140 deletions

View File

@@ -45,15 +45,22 @@ static const struct sc_asn1_entry c_sm_rapdu[] = {
};
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)
const char *func, const char *label, const u8 *data, size_t len,
FILE *f)
{
char buf[1024];
sc_hex_dump(ctx, data, len, buf, sizeof buf);
sc_do_log(ctx, type, file, line, func,
"\n%s (%u byte%s):\n%s"
"======================================================================",
label, len, len==1?"":"s", buf);
if (!f) {
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"
"======================================================================\n",
label, len, len==1?"":"s", buf);
}
}
int