use EAC_init() and EAC_cleanup()
This commit is contained in:
@@ -71,6 +71,9 @@ main (int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* initialize OpenPACE */
|
||||||
|
EAC_init();
|
||||||
|
|
||||||
|
|
||||||
/* Now we try to change the PIN. Therefor we need to establish a SM channel
|
/* Now we try to change the PIN. Therefor we need to establish a SM channel
|
||||||
* with PACE.
|
* with PACE.
|
||||||
@@ -128,6 +131,7 @@ err:
|
|||||||
sc_reset(card, 1);
|
sc_reset(card, 1);
|
||||||
sc_disconnect_card(card);
|
sc_disconnect_card(card);
|
||||||
sc_release_context(ctx);
|
sc_release_context(ctx);
|
||||||
|
EAC_cleanup();
|
||||||
|
|
||||||
return -r;
|
return -r;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,6 +373,8 @@ main (int argc, char **argv)
|
|||||||
sc_initialize_boxing_cmds(ctx);
|
sc_initialize_boxing_cmds(ctx);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
EAC_init();
|
||||||
|
|
||||||
if (cmdline.break_flag) {
|
if (cmdline.break_flag) {
|
||||||
/* The biggest buffer sprintf could write with "%llu" */
|
/* The biggest buffer sprintf could write with "%llu" */
|
||||||
char secretbuf[strlen("18446744073709551615")+1];
|
char secretbuf[strlen("18446744073709551615")+1];
|
||||||
@@ -808,6 +810,7 @@ err:
|
|||||||
sc_reset(card, 1);
|
sc_reset(card, 1);
|
||||||
sc_disconnect_card(card);
|
sc_disconnect_card(card);
|
||||||
sc_release_context(ctx);
|
sc_release_context(ctx);
|
||||||
|
EAC_cleanup();
|
||||||
|
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
fprintf(stderr, "Error: %s\n", sc_strerror(r));
|
fprintf(stderr, "Error: %s\n", sc_strerror(r));
|
||||||
|
|||||||
Reference in New Issue
Block a user