Blame MacOSX/reader.h

Packit 9f0df5
/*
Packit 9f0df5
 * MUSCLE SmartCard Development ( http://pcsclite.alioth.debian.org/pcsclite.html )
Packit 9f0df5
 *
Packit 9f0df5
 * Copyright (C) 1999-2005
Packit 9f0df5
 *  David Corcoran <corcoran@musclecard.com>
Packit 9f0df5
 * Copyright (C) 2005-2009
Packit 9f0df5
 *  Ludovic Rousseau <ludovic.rousseau@free.fr>
Packit 9f0df5
 *
Packit 9f0df5
Redistribution and use in source and binary forms, with or without
Packit 9f0df5
modification, are permitted provided that the following conditions
Packit 9f0df5
are met:
Packit 9f0df5
Packit 9f0df5
1. Redistributions of source code must retain the above copyright
Packit 9f0df5
   notice, this list of conditions and the following disclaimer.
Packit 9f0df5
2. Redistributions in binary form must reproduce the above copyright
Packit 9f0df5
   notice, this list of conditions and the following disclaimer in the
Packit 9f0df5
   documentation and/or other materials provided with the distribution.
Packit 9f0df5
3. The name of the author may not be used to endorse or promote products
Packit 9f0df5
   derived from this software without specific prior written permission.
Packit 9f0df5
Packit 9f0df5
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
Packit 9f0df5
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Packit 9f0df5
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
Packit 9f0df5
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
Packit 9f0df5
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
Packit 9f0df5
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Packit 9f0df5
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Packit 9f0df5
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Packit 9f0df5
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
Packit 9f0df5
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 9f0df5
 */
Packit 9f0df5
Packit 9f0df5
/**
Packit 9f0df5
 * @file
Packit 9f0df5
 * @brief This keeps a list of defines shared between the driver and the application
Packit 9f0df5
 */
Packit 9f0df5
Packit 9f0df5
#ifndef __reader_h__
Packit 9f0df5
#define __reader_h__
Packit 9f0df5
Packit 9f0df5
/*
Packit 9f0df5
 * Tags for requesting card and reader attributes
Packit 9f0df5
 */
Packit 9f0df5
Packit 9f0df5
#define SCARD_ATTR_VALUE(Class, Tag) ((((ULONG)(Class)) << 16) | ((ULONG)(Tag)))
Packit 9f0df5
Packit 9f0df5
#define SCARD_CLASS_VENDOR_INFO     1   /**< Vendor information definitions */
Packit 9f0df5
#define SCARD_CLASS_COMMUNICATIONS  2   /**< Communication definitions */
Packit 9f0df5
#define SCARD_CLASS_PROTOCOL        3   /**< Protocol definitions */
Packit 9f0df5
#define SCARD_CLASS_POWER_MGMT      4   /**< Power Management definitions */
Packit 9f0df5
#define SCARD_CLASS_SECURITY        5   /**< Security Assurance definitions */
Packit 9f0df5
#define SCARD_CLASS_MECHANICAL      6   /**< Mechanical characteristic definitions */
Packit 9f0df5
#define SCARD_CLASS_VENDOR_DEFINED  7   /**< Vendor specific definitions */
Packit 9f0df5
#define SCARD_CLASS_IFD_PROTOCOL    8   /**< Interface Device Protocol options */
Packit 9f0df5
#define SCARD_CLASS_ICC_STATE       9   /**< ICC State specific definitions */
Packit 9f0df5
#define SCARD_CLASS_SYSTEM     0x7fff   /**< System-specific definitions */
Packit 9f0df5
Packit 9f0df5
#define SCARD_ATTR_VENDOR_NAME SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0100) /**< Vendor name. */
Packit 9f0df5
#define SCARD_ATTR_VENDOR_IFD_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0101) /**< Vendor-supplied interface device type (model designation of reader). */
Packit 9f0df5
#define SCARD_ATTR_VENDOR_IFD_VERSION SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0102) /**< Vendor-supplied interface device version (DWORD in the form 0xMMmmbbbb where MM = major version, mm = minor version, and bbbb = build number). */
Packit 9f0df5
#define SCARD_ATTR_VENDOR_IFD_SERIAL_NO SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0103) /**< Vendor-supplied interface device serial number. */
Packit 9f0df5
#define SCARD_ATTR_CHANNEL_ID SCARD_ATTR_VALUE(SCARD_CLASS_COMMUNICATIONS, 0x0110) /**< DWORD encoded as 0xDDDDCCCC, where DDDD = data channel type and CCCC = channel number */
Packit 9f0df5
#define SCARD_ATTR_ASYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0120) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_DEFAULT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0121) /**< Default clock rate, in kHz. */
Packit 9f0df5
#define SCARD_ATTR_MAX_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0122) /**< Maximum clock rate, in kHz. */
Packit 9f0df5
#define SCARD_ATTR_DEFAULT_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0123) /**< Default data rate, in bps. */
Packit 9f0df5
#define SCARD_ATTR_MAX_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0124) /**< Maximum data rate, in bps. */
Packit 9f0df5
#define SCARD_ATTR_MAX_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0125) /**< Maximum bytes for information file size device. */
Packit 9f0df5
#define SCARD_ATTR_SYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0126) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_POWER_MGMT_SUPPORT SCARD_ATTR_VALUE(SCARD_CLASS_POWER_MGMT, 0x0131) /**< Zero if device does not support power down while smart card is inserted. Nonzero otherwise. */
Packit 9f0df5
#define SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0140) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_USER_AUTH_INPUT_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0142) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_CHARACTERISTICS SCARD_ATTR_VALUE(SCARD_CLASS_MECHANICAL, 0x0150) /**< DWORD indicating which mechanical characteristics are supported. If zero, no special characteristics are supported. Note that multiple bits can be set */
Packit 9f0df5
Packit 9f0df5
#define SCARD_ATTR_CURRENT_PROTOCOL_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0201) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0202) /**< Current clock rate, in kHz. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_F SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0203) /**< Clock conversion factor. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_D SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0204) /**< Bit rate conversion factor. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_N SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0205) /**< Current guard time. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_W SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0206) /**< Current work waiting time. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_IFSC SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0207) /**< Current byte size for information field size card. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0208) /**< Current byte size for information field size device. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0209) /**< Current block waiting time. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_CWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020a) /**< Current character waiting time. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_EBC_ENCODING SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020b) /**< Current error block control encoding. */
Packit 9f0df5
#define SCARD_ATTR_EXTENDED_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020c) /**< FIXME */
Packit 9f0df5
Packit 9f0df5
#define SCARD_ATTR_ICC_PRESENCE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0300) /**< Single byte indicating smart card presence */
Packit 9f0df5
#define SCARD_ATTR_ICC_INTERFACE_STATUS SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0301) /**< Single byte. Zero if smart card electrical contact is not active; nonzero if contact is active. */
Packit 9f0df5
#define SCARD_ATTR_CURRENT_IO_STATE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0302) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_ATR_STRING SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0303) /**< Answer to reset (ATR) string. */
Packit 9f0df5
#define SCARD_ATTR_ICC_TYPE_PER_ATR SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0304) /**< Single byte indicating smart card type */
Packit 9f0df5
Packit 9f0df5
#define SCARD_ATTR_ESC_RESET SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA000) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_ESC_CANCEL SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA003) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_ESC_AUTHREQUEST SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA005) /**< FIXME */
Packit 9f0df5
#define SCARD_ATTR_MAXINPUT SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA007) /**< FIXME */
Packit 9f0df5
Packit 9f0df5
#define SCARD_ATTR_DEVICE_UNIT SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0001) /**< Instance of this vendor's reader attached to the computer. The first instance will be device unit 0, the next will be unit 1 (if it is the same brand of reader) and so on. Two different brands of readers will both have zero for this value. */
Packit 9f0df5
#define SCARD_ATTR_DEVICE_IN_USE SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0002) /**< Reserved for future use. */
Packit 9f0df5
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0003)
Packit 9f0df5
#define SCARD_ATTR_DEVICE_SYSTEM_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0004)
Packit 9f0df5
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0005)
Packit 9f0df5
#define SCARD_ATTR_DEVICE_SYSTEM_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0006)
Packit 9f0df5
#define SCARD_ATTR_SUPRESS_T1_IFS_REQUEST SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0007) /**< FIXME */
Packit 9f0df5
Packit 9f0df5
#ifdef UNICODE
Packit 9f0df5
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_W /**< Reader's display name. */
Packit 9f0df5
#define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_W /**< Reader's system name. */
Packit 9f0df5
#else
Packit 9f0df5
#define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_A /**< Reader's display name. */
Packit 9f0df5
#define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_A /**< Reader's system name. */
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/**
Packit 9f0df5
 * Provide source compatibility on different platforms
Packit 9f0df5
 */
Packit 9f0df5
#define SCARD_CTL_CODE(code) (0x42000000 + (code))
Packit 9f0df5
Packit 9f0df5
/**
Packit 9f0df5
 * PC/SC part 10 v2.02.07 March 2010 reader tags
Packit 9f0df5
 */
Packit 9f0df5
#define CM_IOCTL_GET_FEATURE_REQUEST SCARD_CTL_CODE(3400)
Packit 9f0df5
Packit 9f0df5
#define FEATURE_VERIFY_PIN_START         0x01
Packit 9f0df5
#define FEATURE_VERIFY_PIN_FINISH        0x02
Packit 9f0df5
#define FEATURE_MODIFY_PIN_START         0x03
Packit 9f0df5
#define FEATURE_MODIFY_PIN_FINISH        0x04
Packit 9f0df5
#define FEATURE_GET_KEY_PRESSED          0x05
Packit 9f0df5
#define FEATURE_VERIFY_PIN_DIRECT        0x06 /**< Verify PIN */
Packit 9f0df5
#define FEATURE_MODIFY_PIN_DIRECT        0x07 /**< Modify PIN */
Packit 9f0df5
#define FEATURE_MCT_READER_DIRECT        0x08
Packit 9f0df5
#define FEATURE_MCT_UNIVERSAL            0x09
Packit 9f0df5
#define FEATURE_IFD_PIN_PROPERTIES       0x0A /**< retrieve properties of the IFD regarding PIN handling */
Packit 9f0df5
#define FEATURE_ABORT                    0x0B
Packit 9f0df5
#define FEATURE_SET_SPE_MESSAGE          0x0C
Packit 9f0df5
#define FEATURE_VERIFY_PIN_DIRECT_APP_ID 0x0D
Packit 9f0df5
#define FEATURE_MODIFY_PIN_DIRECT_APP_ID 0x0E
Packit 9f0df5
#define FEATURE_WRITE_DISPLAY            0x0F
Packit 9f0df5
#define FEATURE_GET_KEY                  0x10
Packit 9f0df5
#define FEATURE_IFD_DISPLAY_PROPERTIES   0x11
Packit 9f0df5
#define FEATURE_GET_TLV_PROPERTIES       0x12
Packit 9f0df5
#define FEATURE_CCID_ESC_COMMAND         0x13
Packit 9f0df5
#define FEATURE_EXECUTE_PACE             0x20
Packit 9f0df5
Packit 9f0df5
/* structures used (but not defined) in PC/SC Part 10:
Packit 9f0df5
 * "IFDs with Secure Pin Entry Capabilities" */
Packit 9f0df5
Packit 9f0df5
#include <inttypes.h>
Packit 9f0df5
Packit 9f0df5
/* Set structure elements aligment on bytes
Packit 9f0df5
 * http://gcc.gnu.org/onlinedocs/gcc/Structure_002dPacking-Pragmas.html */
Packit 9f0df5
#if defined(__APPLE__) | defined(sun)
Packit 9f0df5
#pragma pack(1)
Packit 9f0df5
#else
Packit 9f0df5
#pragma pack(push, 1)
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/** the structure must be 6-bytes long */
Packit 9f0df5
typedef struct
Packit 9f0df5
{
Packit 9f0df5
	uint8_t tag;
Packit 9f0df5
	uint8_t length;
Packit 9f0df5
	uint32_t value;	/**< This value is always in BIG ENDIAN format as documented in PCSC v2 part 10 ch 2.2 page 2. You can use ntohl() for example */
Packit 9f0df5
} PCSC_TLV_STRUCTURE;
Packit 9f0df5
Packit 9f0df5
/** Since CCID 1.4.1 (revision 5252) the byte order is no more important
Packit 9f0df5
 * These macros are now deprecated and should be removed in the future */
Packit 9f0df5
#define HOST_TO_CCID_16(x) (x)
Packit 9f0df5
#define HOST_TO_CCID_32(x) (x)
Packit 9f0df5
Packit 9f0df5
/** structure used with \ref FEATURE_VERIFY_PIN_DIRECT */
Packit 9f0df5
typedef struct
Packit 9f0df5
{
Packit 9f0df5
	uint8_t bTimerOut;	/**< timeout is seconds (00 means use default timeout) */
Packit 9f0df5
	uint8_t bTimerOut2; /**< timeout in seconds after first key stroke */
Packit 9f0df5
	uint8_t bmFormatString; /**< formatting options */
Packit 9f0df5
	uint8_t bmPINBlockString; /**< bits 7-4 bit size of PIN length in APDU,
Packit 9f0df5
	                        * bits 3-0 PIN block size in bytes after
Packit 9f0df5
	                        * justification and formatting */
Packit 9f0df5
	uint8_t bmPINLengthFormat; /**< bits 7-5 RFU,
Packit 9f0df5
	                         * bit 4 set if system units are bytes, clear if
Packit 9f0df5
	                         * system units are bits,
Packit 9f0df5
	                         * bits 3-0 PIN length position in system units */
Packit 9f0df5
	uint16_t wPINMaxExtraDigit; /**< 0xXXYY where XX is minimum PIN size in digits,
Packit 9f0df5
	                            and YY is maximum PIN size in digits */
Packit 9f0df5
	uint8_t bEntryValidationCondition; /**< Conditions under which PIN entry should
Packit 9f0df5
	                                 * be considered complete */
Packit 9f0df5
	uint8_t bNumberMessage; /**< Number of messages to display for PIN verification */
Packit 9f0df5
	uint16_t wLangId; /**< Language for messages */
Packit 9f0df5
	uint8_t bMsgIndex; /**< Message index (should be 00) */
Packit 9f0df5
	uint8_t bTeoPrologue[3]; /**< T=1 block prologue field to use (fill with 00) */
Packit 9f0df5
	uint32_t ulDataLength; /**< length of Data to be sent to the ICC */
Packit 9f0df5
	uint8_t abData
Packit 9f0df5
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
Packit 9f0df5
	[] /* valid C99 code */
Packit 9f0df5
#else
Packit 9f0df5
	[0] /* non-standard, but usually working code */
Packit 9f0df5
#endif
Packit 9f0df5
	; /**< Data to send to the ICC */
Packit 9f0df5
} PIN_VERIFY_STRUCTURE;
Packit 9f0df5
Packit 9f0df5
/** structure used with \ref FEATURE_MODIFY_PIN_DIRECT */
Packit 9f0df5
typedef struct
Packit 9f0df5
{
Packit 9f0df5
	uint8_t bTimerOut;	/**< timeout is seconds (00 means use default timeout) */
Packit 9f0df5
	uint8_t bTimerOut2; /**< timeout in seconds after first key stroke */
Packit 9f0df5
	uint8_t bmFormatString; /**< formatting options */
Packit 9f0df5
	uint8_t bmPINBlockString; /**< bits 7-4 bit size of PIN length in APDU,
Packit 9f0df5
	                        * bits 3-0 PIN block size in bytes after
Packit 9f0df5
	                        * justification and formatting */
Packit 9f0df5
	uint8_t bmPINLengthFormat; /**< bits 7-5 RFU,
Packit 9f0df5
	                         * bit 4 set if system units are bytes, clear if
Packit 9f0df5
	                         * system units are bits,
Packit 9f0df5
	                         * bits 3-0 PIN length position in system units */
Packit 9f0df5
	uint8_t bInsertionOffsetOld; /**< Insertion position offset in bytes for
Packit 9f0df5
	                             the current PIN */
Packit 9f0df5
	uint8_t bInsertionOffsetNew; /**< Insertion position offset in bytes for
Packit 9f0df5
	                             the new PIN */
Packit 9f0df5
	uint16_t wPINMaxExtraDigit;
Packit 9f0df5
	                         /**< 0xXXYY where XX is minimum PIN size in digits,
Packit 9f0df5
	                            and YY is maximum PIN size in digits */
Packit 9f0df5
	uint8_t bConfirmPIN; /**< Flags governing need for confirmation of new PIN */
Packit 9f0df5
	uint8_t bEntryValidationCondition; /**< Conditions under which PIN entry should
Packit 9f0df5
	                                 * be considered complete */
Packit 9f0df5
	uint8_t bNumberMessage; /**< Number of messages to display for PIN verification*/
Packit 9f0df5
	uint16_t wLangId; /**< Language for messages */
Packit 9f0df5
	uint8_t bMsgIndex1; /**< index of 1st prompting message */
Packit 9f0df5
	uint8_t bMsgIndex2; /**< index of 2d prompting message */
Packit 9f0df5
	uint8_t bMsgIndex3; /**< index of 3d prompting message */
Packit 9f0df5
	uint8_t bTeoPrologue[3]; /**< T=1 block prologue field to use (fill with 00) */
Packit 9f0df5
	uint32_t ulDataLength; /**< length of Data to be sent to the ICC */
Packit 9f0df5
	uint8_t abData
Packit 9f0df5
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
Packit 9f0df5
	[] /* valid C99 code */
Packit 9f0df5
#else
Packit 9f0df5
	[0] /* non-standard, but usually working code */
Packit 9f0df5
#endif
Packit 9f0df5
	; /**< Data to send to the ICC */
Packit 9f0df5
} PIN_MODIFY_STRUCTURE;
Packit 9f0df5
Packit 9f0df5
/** structure used with \ref FEATURE_IFD_PIN_PROPERTIES */
Packit 9f0df5
typedef struct {
Packit 9f0df5
	uint16_t wLcdLayout; /**< display characteristics */
Packit 9f0df5
	uint8_t bEntryValidationCondition;
Packit 9f0df5
	uint8_t bTimeOut2;
Packit 9f0df5
} PIN_PROPERTIES_STRUCTURE;
Packit 9f0df5
Packit 9f0df5
/* restore default structure elements alignment */
Packit 9f0df5
#if defined(__APPLE__) | defined(sun)
Packit 9f0df5
#pragma pack()
Packit 9f0df5
#else
Packit 9f0df5
#pragma pack(pop)
Packit 9f0df5
#endif
Packit 9f0df5
Packit 9f0df5
/* properties returned by FEATURE_GET_TLV_PROPERTIES */
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_wLcdLayout 1
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_bEntryValidationCondition 2
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_bTimeOut2 3
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_wLcdMaxCharacters 4
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_wLcdMaxLines 5
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_bMinPINSize 6
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_bMaxPINSize 7
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_sFirmwareID 8
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_bPPDUSupport 9
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_dwMaxAPDUDataSize 10
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_wIdVendor 11
Packit 9f0df5
#define PCSCv2_PART10_PROPERTY_wIdProduct 12
Packit 9f0df5
Packit 9f0df5
#endif
Packit 9f0df5