mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-10 13:04:23 +01:00
scd: PC/SC cleanup.
* scd/apdu.c (pcsc_dword_t): New. It was named as DWORD (double-word) when a word was 16-bit. (struct reader_table_s): Fixes for types. (struct pcsc_readerstate_s) [__APPLE__]: Enable #pragma pack(1). Throughout: Fixes for types. * scd/pcsc-wrapper.c: Likewise. -- Problem reported for 1.4.x by the issue 1358.
This commit is contained in:
parent
33d276791c
commit
ae22d629b6
128
scd/apdu.c
128
scd/apdu.c
@ -81,6 +81,12 @@
|
|||||||
#define DLSTDCALL
|
#define DLSTDCALL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__APPLE__) || defined(_WIN32) || defined(__CYGWIN__)
|
||||||
|
typedef unsinged int pcsc_dword_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned long pcsc_dword_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* A structure to collect information pertaining to one reader
|
/* A structure to collect information pertaining to one reader
|
||||||
slot. */
|
slot. */
|
||||||
struct reader_table_s {
|
struct reader_table_s {
|
||||||
@ -106,11 +112,11 @@ struct reader_table_s {
|
|||||||
ccid_driver_t handle;
|
ccid_driver_t handle;
|
||||||
} ccid;
|
} ccid;
|
||||||
struct {
|
struct {
|
||||||
unsigned long context;
|
long context;
|
||||||
unsigned long card;
|
long card;
|
||||||
unsigned long protocol;
|
pcsc_dword_t protocol;
|
||||||
unsigned long verify_ioctl;
|
pcsc_dword_t verify_ioctl;
|
||||||
unsigned long modify_ioctl;
|
pcsc_dword_t modify_ioctl;
|
||||||
#ifdef NEED_PCSC_WRAPPER
|
#ifdef NEED_PCSC_WRAPPER
|
||||||
int req_fd;
|
int req_fd;
|
||||||
int rsp_fd;
|
int rsp_fd;
|
||||||
@ -232,67 +238,75 @@ struct pcsc_io_request_s
|
|||||||
|
|
||||||
typedef struct pcsc_io_request_s *pcsc_io_request_t;
|
typedef struct pcsc_io_request_s *pcsc_io_request_t;
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#pragma pack(1)
|
||||||
|
#endif
|
||||||
|
|
||||||
struct pcsc_readerstate_s
|
struct pcsc_readerstate_s
|
||||||
{
|
{
|
||||||
const char *reader;
|
const char *reader;
|
||||||
void *user_data;
|
void *user_data;
|
||||||
unsigned long current_state;
|
pcsc_dword_t current_state;
|
||||||
unsigned long event_state;
|
pcsc_dword_t event_state;
|
||||||
unsigned long atrlen;
|
pcsc_dword_t atrlen;
|
||||||
unsigned char atr[33];
|
unsigned char atr[33];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#pragma pack()
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct pcsc_readerstate_s *pcsc_readerstate_t;
|
typedef struct pcsc_readerstate_s *pcsc_readerstate_t;
|
||||||
|
|
||||||
long (* DLSTDCALL pcsc_establish_context) (unsigned long scope,
|
long (* DLSTDCALL pcsc_establish_context) (pcsc_dword_t scope,
|
||||||
const void *reserved1,
|
const void *reserved1,
|
||||||
const void *reserved2,
|
const void *reserved2,
|
||||||
unsigned long *r_context);
|
long *r_context);
|
||||||
long (* DLSTDCALL pcsc_release_context) (unsigned long context);
|
long (* DLSTDCALL pcsc_release_context) (long context);
|
||||||
long (* DLSTDCALL pcsc_list_readers) (unsigned long context,
|
long (* DLSTDCALL pcsc_list_readers) (long context,
|
||||||
const char *groups,
|
const char *groups,
|
||||||
char *readers, unsigned long*readerslen);
|
char *readers, pcsc_dword_t*readerslen);
|
||||||
long (* DLSTDCALL pcsc_get_status_change) (unsigned long context,
|
long (* DLSTDCALL pcsc_get_status_change) (long context,
|
||||||
unsigned long timeout,
|
pcsc_dword_t timeout,
|
||||||
pcsc_readerstate_t readerstates,
|
pcsc_readerstate_t readerstates,
|
||||||
unsigned long nreaderstates);
|
pcsc_dword_t nreaderstates);
|
||||||
long (* DLSTDCALL pcsc_connect) (unsigned long context,
|
long (* DLSTDCALL pcsc_connect) (long context,
|
||||||
const char *reader,
|
const char *reader,
|
||||||
unsigned long share_mode,
|
pcsc_dword_t share_mode,
|
||||||
unsigned long preferred_protocols,
|
pcsc_dword_t preferred_protocols,
|
||||||
unsigned long *r_card,
|
long *r_card,
|
||||||
unsigned long *r_active_protocol);
|
pcsc_dword_t *r_active_protocol);
|
||||||
long (* DLSTDCALL pcsc_reconnect) (unsigned long card,
|
long (* DLSTDCALL pcsc_reconnect) (long card,
|
||||||
unsigned long share_mode,
|
pcsc_dword_t share_mode,
|
||||||
unsigned long preferred_protocols,
|
pcsc_dword_t preferred_protocols,
|
||||||
unsigned long initialization,
|
pcsc_dword_t initialization,
|
||||||
unsigned long *r_active_protocol);
|
pcsc_dword_t *r_active_protocol);
|
||||||
long (* DLSTDCALL pcsc_disconnect) (unsigned long card,
|
long (* DLSTDCALL pcsc_disconnect) (long card,
|
||||||
unsigned long disposition);
|
pcsc_dword_t disposition);
|
||||||
long (* DLSTDCALL pcsc_status) (unsigned long card,
|
long (* DLSTDCALL pcsc_status) (long card,
|
||||||
char *reader, unsigned long *readerlen,
|
char *reader, pcsc_dword_t *readerlen,
|
||||||
unsigned long *r_state,
|
pcsc_dword_t *r_state,
|
||||||
unsigned long *r_protocol,
|
pcsc_dword_t *r_protocol,
|
||||||
unsigned char *atr, unsigned long *atrlen);
|
unsigned char *atr, pcsc_dword_t *atrlen);
|
||||||
long (* DLSTDCALL pcsc_begin_transaction) (unsigned long card);
|
long (* DLSTDCALL pcsc_begin_transaction) (long card);
|
||||||
long (* DLSTDCALL pcsc_end_transaction) (unsigned long card,
|
long (* DLSTDCALL pcsc_end_transaction) (long card,
|
||||||
unsigned long disposition);
|
pcsc_dword_t disposition);
|
||||||
long (* DLSTDCALL pcsc_transmit) (unsigned long card,
|
long (* DLSTDCALL pcsc_transmit) (long card,
|
||||||
const pcsc_io_request_t send_pci,
|
const pcsc_io_request_t send_pci,
|
||||||
const unsigned char *send_buffer,
|
const unsigned char *send_buffer,
|
||||||
unsigned long send_len,
|
pcsc_dword_t send_len,
|
||||||
pcsc_io_request_t recv_pci,
|
pcsc_io_request_t recv_pci,
|
||||||
unsigned char *recv_buffer,
|
unsigned char *recv_buffer,
|
||||||
unsigned long *recv_len);
|
pcsc_dword_t *recv_len);
|
||||||
long (* DLSTDCALL pcsc_set_timeout) (unsigned long context,
|
long (* DLSTDCALL pcsc_set_timeout) (long context,
|
||||||
unsigned long timeout);
|
pcsc_dword_t timeout);
|
||||||
long (* DLSTDCALL pcsc_control) (unsigned long card,
|
long (* DLSTDCALL pcsc_control) (long card,
|
||||||
unsigned long control_code,
|
pcsc_dword_t control_code,
|
||||||
const void *send_buffer,
|
const void *send_buffer,
|
||||||
unsigned long send_len,
|
pcsc_dword_t send_len,
|
||||||
void *recv_buffer,
|
void *recv_buffer,
|
||||||
unsigned long recv_len,
|
pcsc_dword_t recv_len,
|
||||||
unsigned long *bytes_returned);
|
pcsc_dword_t *bytes_returned);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes. */
|
/* Prototypes. */
|
||||||
@ -1053,7 +1067,7 @@ pcsc_send_apdu_direct (int slot, unsigned char *apdu, size_t apdulen,
|
|||||||
{
|
{
|
||||||
long err;
|
long err;
|
||||||
struct pcsc_io_request_s send_pci;
|
struct pcsc_io_request_s send_pci;
|
||||||
unsigned long recv_len;
|
pcsc_dword_t recv_len;
|
||||||
|
|
||||||
if (!reader_table[slot].atrlen
|
if (!reader_table[slot].atrlen
|
||||||
&& (err = reset_pcsc_reader (slot)))
|
&& (err = reset_pcsc_reader (slot)))
|
||||||
@ -1216,7 +1230,7 @@ pcsc_send_apdu (int slot, unsigned char *apdu, size_t apdulen,
|
|||||||
|
|
||||||
#ifndef NEED_PCSC_WRAPPER
|
#ifndef NEED_PCSC_WRAPPER
|
||||||
static int
|
static int
|
||||||
control_pcsc_direct (int slot, unsigned long ioctl_code,
|
control_pcsc_direct (int slot, pcsc_dword_t ioctl_code,
|
||||||
const unsigned char *cntlbuf, size_t len,
|
const unsigned char *cntlbuf, size_t len,
|
||||||
unsigned char *buffer, size_t *buflen)
|
unsigned char *buffer, size_t *buflen)
|
||||||
{
|
{
|
||||||
@ -1238,7 +1252,7 @@ control_pcsc_direct (int slot, unsigned long ioctl_code,
|
|||||||
|
|
||||||
#ifdef NEED_PCSC_WRAPPER
|
#ifdef NEED_PCSC_WRAPPER
|
||||||
static int
|
static int
|
||||||
control_pcsc_wrapped (int slot, unsigned long ioctl_code,
|
control_pcsc_wrapped (int slot, pcsc_dword_t ioctl_code,
|
||||||
const unsigned char *cntlbuf, size_t len,
|
const unsigned char *cntlbuf, size_t len,
|
||||||
unsigned char *buffer, size_t *buflen)
|
unsigned char *buffer, size_t *buflen)
|
||||||
{
|
{
|
||||||
@ -1346,7 +1360,7 @@ control_pcsc_wrapped (int slot, unsigned long ioctl_code,
|
|||||||
actual output size will be stored at BUFLEN. Returns: A status word.
|
actual output size will be stored at BUFLEN. Returns: A status word.
|
||||||
This routine is used for PIN pad input support. */
|
This routine is used for PIN pad input support. */
|
||||||
static int
|
static int
|
||||||
control_pcsc (int slot, unsigned long ioctl_code,
|
control_pcsc (int slot, pcsc_dword_t ioctl_code,
|
||||||
const unsigned char *cntlbuf, size_t len,
|
const unsigned char *cntlbuf, size_t len,
|
||||||
unsigned char *buffer, size_t *buflen)
|
unsigned char *buffer, size_t *buflen)
|
||||||
{
|
{
|
||||||
@ -1483,8 +1497,8 @@ connect_pcsc_card (int slot)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
char reader[250];
|
char reader[250];
|
||||||
unsigned long readerlen, atrlen;
|
pcsc_dword_t readerlen, atrlen;
|
||||||
unsigned long card_state, card_protocol;
|
long card_state, card_protocol;
|
||||||
|
|
||||||
atrlen = DIM (reader_table[0].atr);
|
atrlen = DIM (reader_table[0].atr);
|
||||||
readerlen = sizeof reader -1 ;
|
readerlen = sizeof reader -1 ;
|
||||||
@ -1680,7 +1694,7 @@ open_pcsc_reader_direct (const char *portstr)
|
|||||||
long err;
|
long err;
|
||||||
int slot;
|
int slot;
|
||||||
char *list = NULL;
|
char *list = NULL;
|
||||||
unsigned long nreader, listlen;
|
pcsc_dword_t nreader, listlen;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
slot = new_reader_slot ();
|
slot = new_reader_slot ();
|
||||||
@ -2021,14 +2035,14 @@ check_pcsc_pinpad (int slot, int command, pininfo_t *pininfo)
|
|||||||
check_again:
|
check_again:
|
||||||
if (command == ISO7816_VERIFY)
|
if (command == ISO7816_VERIFY)
|
||||||
{
|
{
|
||||||
if (reader_table[slot].pcsc.verify_ioctl == (unsigned long)-1)
|
if (reader_table[slot].pcsc.verify_ioctl == (pcsc_dword_t)-1)
|
||||||
return SW_NOT_SUPPORTED;
|
return SW_NOT_SUPPORTED;
|
||||||
else if (reader_table[slot].pcsc.verify_ioctl != 0)
|
else if (reader_table[slot].pcsc.verify_ioctl != 0)
|
||||||
return 0; /* Success */
|
return 0; /* Success */
|
||||||
}
|
}
|
||||||
else if (command == ISO7816_CHANGE_REFERENCE_DATA)
|
else if (command == ISO7816_CHANGE_REFERENCE_DATA)
|
||||||
{
|
{
|
||||||
if (reader_table[slot].pcsc.modify_ioctl == (unsigned long)-1)
|
if (reader_table[slot].pcsc.modify_ioctl == (pcsc_dword_t)-1)
|
||||||
return SW_NOT_SUPPORTED;
|
return SW_NOT_SUPPORTED;
|
||||||
else if (reader_table[slot].pcsc.modify_ioctl != 0)
|
else if (reader_table[slot].pcsc.modify_ioctl != 0)
|
||||||
return 0; /* Success */
|
return 0; /* Success */
|
||||||
@ -2036,8 +2050,8 @@ check_pcsc_pinpad (int slot, int command, pininfo_t *pininfo)
|
|||||||
else
|
else
|
||||||
return SW_NOT_SUPPORTED;
|
return SW_NOT_SUPPORTED;
|
||||||
|
|
||||||
reader_table[slot].pcsc.verify_ioctl = (unsigned long)-1;
|
reader_table[slot].pcsc.verify_ioctl = (pcsc_dword_t)-1;
|
||||||
reader_table[slot].pcsc.modify_ioctl = (unsigned long)-1;
|
reader_table[slot].pcsc.modify_ioctl = (pcsc_dword_t)-1;
|
||||||
|
|
||||||
sw = control_pcsc (slot, CM_IOCTL_GET_FEATURE_REQUEST, NULL, 0, buf, &len);
|
sw = control_pcsc (slot, CM_IOCTL_GET_FEATURE_REQUEST, NULL, 0, buf, &len);
|
||||||
if (sw)
|
if (sw)
|
||||||
|
@ -65,6 +65,12 @@
|
|||||||
|
|
||||||
static int verbose;
|
static int verbose;
|
||||||
|
|
||||||
|
#if defined(__APPLE__) || defined(_WIN32) || defined(__CYGWIN__)
|
||||||
|
typedef unsinged int pcsc_dword_t;
|
||||||
|
#else
|
||||||
|
typedef unsigned long pcsc_dword_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* PC/SC constants and function pointer. */
|
/* PC/SC constants and function pointer. */
|
||||||
#define PCSC_SCOPE_USER 0
|
#define PCSC_SCOPE_USER 0
|
||||||
@ -112,16 +118,24 @@ struct pcsc_io_request_s {
|
|||||||
|
|
||||||
typedef struct pcsc_io_request_s *pcsc_io_request_t;
|
typedef struct pcsc_io_request_s *pcsc_io_request_t;
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#pragma pack(1)
|
||||||
|
#endif
|
||||||
|
|
||||||
struct pcsc_readerstate_s
|
struct pcsc_readerstate_s
|
||||||
{
|
{
|
||||||
const char *reader;
|
const char *reader;
|
||||||
void *user_data;
|
void *user_data;
|
||||||
unsigned long current_state;
|
pcsc_dword_t current_state;
|
||||||
unsigned long event_state;
|
pcsc_dword_t event_state;
|
||||||
unsigned long atrlen;
|
pcsc_dword_t atrlen;
|
||||||
unsigned char atr[33];
|
unsigned char atr[33];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#pragma pack()
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct pcsc_readerstate_s *pcsc_readerstate_t;
|
typedef struct pcsc_readerstate_s *pcsc_readerstate_t;
|
||||||
|
|
||||||
|
|
||||||
@ -129,62 +143,62 @@ static int driver_is_open; /* True if the PC/SC driver has been
|
|||||||
initialzied and is ready for
|
initialzied and is ready for
|
||||||
operations. The following variables
|
operations. The following variables
|
||||||
are then valid. */
|
are then valid. */
|
||||||
static unsigned long pcsc_context; /* The current PC/CS context. */
|
static long pcsc_context; /* The current PC/CS context. */
|
||||||
static char *current_rdrname;
|
static char *current_rdrname;
|
||||||
static unsigned long pcsc_card;
|
static long pcsc_card;
|
||||||
static unsigned long pcsc_protocol;
|
static pcsc_dword_t pcsc_protocol;
|
||||||
static unsigned char current_atr[33];
|
static unsigned char current_atr[33];
|
||||||
static size_t current_atrlen;
|
static size_t current_atrlen;
|
||||||
|
|
||||||
long (* pcsc_establish_context) (unsigned long scope,
|
long (* pcsc_establish_context) (pcsc_dword_t scope,
|
||||||
const void *reserved1,
|
const void *reserved1,
|
||||||
const void *reserved2,
|
const void *reserved2,
|
||||||
unsigned long *r_context);
|
long *r_context);
|
||||||
long (* pcsc_release_context) (unsigned long context);
|
long (* pcsc_release_context) (long context);
|
||||||
long (* pcsc_list_readers) (unsigned long context,
|
long (* pcsc_list_readers) (long context,
|
||||||
const char *groups,
|
const char *groups,
|
||||||
char *readers, unsigned long*readerslen);
|
char *readers, pcsc_dword_t *readerslen);
|
||||||
long (* pcsc_get_status_change) (unsigned long context,
|
long (* pcsc_get_status_change) (long context,
|
||||||
unsigned long timeout,
|
pcsc_dword_t timeout,
|
||||||
pcsc_readerstate_t readerstates,
|
pcsc_readerstate_t readerstates,
|
||||||
unsigned long nreaderstates);
|
pcsc_dword_t nreaderstates);
|
||||||
long (* pcsc_connect) (unsigned long context,
|
long (* pcsc_connect) (long context,
|
||||||
const char *reader,
|
const char *reader,
|
||||||
unsigned long share_mode,
|
pcsc_dword_t share_mode,
|
||||||
unsigned long preferred_protocols,
|
pcsc_dword_t preferred_protocols,
|
||||||
unsigned long *r_card,
|
long *r_card,
|
||||||
unsigned long *r_active_protocol);
|
pcsc_dword_t *r_active_protocol);
|
||||||
long (* pcsc_reconnect) (unsigned long card,
|
long (* pcsc_reconnect) (long card,
|
||||||
unsigned long share_mode,
|
pcsc_dword_t share_mode,
|
||||||
unsigned long preferred_protocols,
|
pcsc_dword_t preferred_protocols,
|
||||||
unsigned long initialization,
|
pcsc_dword_t initialization,
|
||||||
unsigned long *r_active_protocol);
|
pcsc_dword_t *r_active_protocol);
|
||||||
long (* pcsc_disconnect) (unsigned long card,
|
long (* pcsc_disconnect) (long card,
|
||||||
unsigned long disposition);
|
pcsc_dword_t disposition);
|
||||||
long (* pcsc_status) (unsigned long card,
|
long (* pcsc_status) (long card,
|
||||||
char *reader, unsigned long *readerlen,
|
char *reader, pcsc_dword_t *readerlen,
|
||||||
unsigned long *r_state,
|
pcsc_dword_t *r_state,
|
||||||
unsigned long *r_protocol,
|
pcsc_dword_t *r_protocol,
|
||||||
unsigned char *atr, unsigned long *atrlen);
|
unsigned char *atr, pcsc_dword_t *atrlen);
|
||||||
long (* pcsc_begin_transaction) (unsigned long card);
|
long (* pcsc_begin_transaction) (long card);
|
||||||
long (* pcsc_end_transaction) (unsigned long card,
|
long (* pcsc_end_transaction) (long card,
|
||||||
unsigned long disposition);
|
pcsc_dword_t disposition);
|
||||||
long (* pcsc_transmit) (unsigned long card,
|
long (* pcsc_transmit) (long card,
|
||||||
const pcsc_io_request_t send_pci,
|
const pcsc_io_request_t send_pci,
|
||||||
const unsigned char *send_buffer,
|
const unsigned char *send_buffer,
|
||||||
unsigned long send_len,
|
pcsc_dword_t send_len,
|
||||||
pcsc_io_request_t recv_pci,
|
pcsc_io_request_t recv_pci,
|
||||||
unsigned char *recv_buffer,
|
unsigned char *recv_buffer,
|
||||||
unsigned long *recv_len);
|
pcsc_dword_t *recv_len);
|
||||||
long (* pcsc_set_timeout) (unsigned long context,
|
long (* pcsc_set_timeout) (long context,
|
||||||
unsigned long timeout);
|
pcsc_dword_t timeout);
|
||||||
long (* pcsc_control) (unsigned long card,
|
long (* pcsc_control) (long card,
|
||||||
unsigned long control_code,
|
pcsc_dword_t control_code,
|
||||||
const void *send_buffer,
|
const void *send_buffer,
|
||||||
unsigned long send_len,
|
pcsc_dword_t send_len,
|
||||||
void *recv_buffer,
|
void *recv_buffer,
|
||||||
unsigned long recv_len,
|
pcsc_dword_t recv_len,
|
||||||
unsigned long *bytes_returned);
|
pcsc_dword_t *bytes_returned);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -394,9 +408,9 @@ handle_open (unsigned char *argbuf, size_t arglen)
|
|||||||
long err;
|
long err;
|
||||||
const char * portstr;
|
const char * portstr;
|
||||||
char *list = NULL;
|
char *list = NULL;
|
||||||
unsigned long nreader, atrlen;
|
pcsc_dword_t nreader, atrlen;
|
||||||
char *p;
|
char *p;
|
||||||
unsigned long card_state, card_protocol;
|
pcsc_dword_t card_state, card_protocol;
|
||||||
unsigned char atr[33];
|
unsigned char atr[33];
|
||||||
|
|
||||||
/* Make sure there is only the port string */
|
/* Make sure there is only the port string */
|
||||||
@ -492,7 +506,7 @@ handle_open (unsigned char *argbuf, size_t arglen)
|
|||||||
if (!err)
|
if (!err)
|
||||||
{
|
{
|
||||||
char reader[250];
|
char reader[250];
|
||||||
unsigned long readerlen;
|
pcsc_dword_t readerlen;
|
||||||
|
|
||||||
atrlen = 33;
|
atrlen = 33;
|
||||||
readerlen = sizeof reader -1;
|
readerlen = sizeof reader -1;
|
||||||
@ -626,8 +640,8 @@ handle_reset (unsigned char *argbuf, size_t arglen)
|
|||||||
{
|
{
|
||||||
long err;
|
long err;
|
||||||
char reader[250];
|
char reader[250];
|
||||||
unsigned long nreader, atrlen;
|
pcsc_dword_t nreader, atrlen;
|
||||||
unsigned long card_state, card_protocol;
|
pcsc_dword_t card_state, card_protocol;
|
||||||
|
|
||||||
(void)argbuf;
|
(void)argbuf;
|
||||||
(void)arglen;
|
(void)arglen;
|
||||||
@ -697,7 +711,7 @@ handle_transmit (unsigned char *argbuf, size_t arglen)
|
|||||||
{
|
{
|
||||||
long err;
|
long err;
|
||||||
struct pcsc_io_request_s send_pci;
|
struct pcsc_io_request_s send_pci;
|
||||||
unsigned long recv_len;
|
pcsc_dword_t recv_len;
|
||||||
unsigned char buffer[1024];
|
unsigned char buffer[1024];
|
||||||
|
|
||||||
/* The apdu should at least be one byte. */
|
/* The apdu should at least be one byte. */
|
||||||
@ -737,8 +751,8 @@ static void
|
|||||||
handle_control (unsigned char *argbuf, size_t arglen)
|
handle_control (unsigned char *argbuf, size_t arglen)
|
||||||
{
|
{
|
||||||
long err;
|
long err;
|
||||||
unsigned long ioctl_code;
|
pcsc_dword_t ioctl_code;
|
||||||
unsigned long recv_len = 1024;
|
pcsc_dword_t recv_len = 1024;
|
||||||
unsigned char buffer[1024];
|
unsigned char buffer[1024];
|
||||||
|
|
||||||
if (arglen < 4)
|
if (arglen < 4)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user