Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
internal.h
Go to the documentation of this file.
1/*
2 * Copyright 2015-2018 Yubico AB
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef YKYH_INTERNAL_H
18#define YKYH_INTERNAL_H
19
20#include <stdbool.h>
21
22//#if BACKEND_PCSC
23//#if defined HAVE_PCSC_WINSCARD_H
24#include <PCSC/wintypes.h>
25#include <PCSC/winscard.h>
26//#else
27//# include <winscard.h>
28//#endif
29//#endif
30
31#define READER_LEN 32
32#define MAX_READERS 16
33
34struct ykyh_state {
35 SCARDCONTEXT context;
36 SCARDHANDLE card;
38};
39
40union u_APDU {
41 struct {
42 unsigned char cla;
43 unsigned char ins;
44 unsigned char p1;
45 unsigned char p2;
46 unsigned char lc;
47 unsigned char data[0xff];
48 } st;
49 unsigned char raw[0xff + 5];
50};
51
52typedef union u_APDU APDU;
53
54unsigned const char aid[] = {0xa0, 0x00, 0x00, 0x05, 0x27, 0x21, 0x07};
55
56#endif
SCARDHANDLE card
Definition internal.h:36
int verbose
Definition internal.h:37
SCARDCONTEXT context
Definition internal.h:35
unsigned char lc
Definition internal.h:46
unsigned char p2
Definition internal.h:45
unsigned char ins
Definition internal.h:43
unsigned char raw[0xff+5]
Definition internal.h:49
unsigned char cla
Definition internal.h:42
unsigned char p1
Definition internal.h:44
struct u_APDU::@119 st
unsigned const char aid[]
Definition internal.h:54