FreeCalypso > hg > fc-sim-tools
view pcsc/atrmain.c @ 82:28fae57b3e29
fcsim1-mkprov: add OTA_C and OTA_D key generation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 10 Apr 2021 23:21:47 +0000 |
parents | 11f4f8a8fa33 |
children |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <pcsclite.h> #include <winscard.h> extern SCARDCONTEXT hContext; extern SCARDHANDLE hCard; extern char *selected_reader; main(argc, argv) char **argv; { parse_reader_select_opt(argc, argv); setup_pcsc_context(); get_reader_list(); select_reader_by_num(); printf("Card reader name: %s\n", selected_reader); connect_to_card(); retrieve_atr("ATR:"); SCardDisconnect(hCard, SCARD_UNPOWER_CARD); SCardReleaseContext(hContext); exit(0); }