move apdu structure to internal.h

This commit is contained in:
Klas Lindfors
2014-06-17 09:35:58 +02:00
parent cb60c782f5
commit 1f8cff5711
2 changed files with 14 additions and 14 deletions
+14
View File
@@ -47,6 +47,20 @@ struct ykpiv_state {
int verbose; int verbose;
}; };
union u_APDU {
struct {
unsigned char cla;
unsigned char ins;
unsigned char p1;
unsigned char p2;
unsigned char lc;
unsigned char data[0xff];
} st;
unsigned char raw[0xff + 5];
};
typedef union u_APDU APDU;
unsigned const char aid[] = { unsigned const char aid[] = {
0xa0, 0x00, 0x00, 0x03, 0x08 0xa0, 0x00, 0x00, 0x03, 0x08
}; };
-14
View File
@@ -38,20 +38,6 @@
#include "internal.h" #include "internal.h"
#include "ykpiv.h" #include "ykpiv.h"
union u_APDU {
struct {
unsigned char cla;
unsigned char ins;
unsigned char p1;
unsigned char p2;
unsigned char lc;
unsigned char data[0xff];
} st;
unsigned char raw[0xff + 5];
};
typedef union u_APDU APDU;
static void dump_hex(const unsigned char *buf, unsigned int len) { static void dump_hex(const unsigned char *buf, unsigned int len) {
unsigned int i; unsigned int i;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {