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
34
struct
ykyh_state
{
35
SCARDCONTEXT
context
;
36
SCARDHANDLE
card
;
37
int
verbose
;
38
};
39
40
union
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
52
typedef
union
u_APDU
APDU
;
53
54
unsigned
const
char
aid
[] = {0xa0, 0x00, 0x00, 0x05, 0x27, 0x21, 0x07};
55
56
#endif
ykyh_state
Definition
internal.h:34
ykyh_state::card
SCARDHANDLE card
Definition
internal.h:36
ykyh_state::verbose
int verbose
Definition
internal.h:37
ykyh_state::context
SCARDCONTEXT context
Definition
internal.h:35
u_APDU
Definition
internal.h:40
u_APDU::lc
unsigned char lc
Definition
internal.h:46
u_APDU::p2
unsigned char p2
Definition
internal.h:45
u_APDU::ins
unsigned char ins
Definition
internal.h:43
u_APDU::raw
unsigned char raw[0xff+5]
Definition
internal.h:49
u_APDU::cla
unsigned char cla
Definition
internal.h:42
u_APDU::p1
unsigned char p1
Definition
internal.h:44
u_APDU::st
struct u_APDU::@119 st
aid
unsigned const char aid[]
Definition
internal.h:54
libraries
yubihsm
ykyh
internal.h
Generated by
1.12.0