annotate misc/fc-pcsc-atr.c @ 26:4bd6275d7c79

fc-pcsc-atr trivial program added
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Feb 2021 15:53:12 +0000
parents simtool/main.c@2071b28cd0c7
children 84d1c31d0fad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 #include <stdio.h>
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 #include <stdlib.h>
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 #include <pcsclite.h>
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 #include <winscard.h>
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include "cardif.h"
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 main(argc, argv)
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 char **argv;
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 {
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 int rc;
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 setup_pcsc_context();
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 get_reader_name();
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 printf("Card reader name: %s\n", reader_name_buf);
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 connect_to_card();
26
4bd6275d7c79 fc-pcsc-atr trivial program added
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
16 rc = retrieve_atr();
4bd6275d7c79 fc-pcsc-atr trivial program added
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
17 if (rc)
4bd6275d7c79 fc-pcsc-atr trivial program added
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
18 error_exit();
4bd6275d7c79 fc-pcsc-atr trivial program added
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
19 else
4bd6275d7c79 fc-pcsc-atr trivial program added
Mychaela Falconia <falcon@freecalypso.org>
parents: 1
diff changeset
20 good_exit();
1
2071b28cd0c7 simtool: first refactored version
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 }