cross-compiling with SMARTCARD or PCSC

Sergio sergioyebenes
Fri Aug 15 13:18:46 PDT 2008


Hi,

i have two questions:

i've cross-compiled wpa_supplicant with only CONFIG_SMARTCARD, not
CONFIG_PCSC. Because i don't need eap-sim or eap-aka (like are written
into doc),but eap-tls with a smartcard into a reader. at this time i
don't have any AP and i'm testing with eapol_test. eapol_test can
establish TLS session and receives Success from radius (having
CONFIG_EAPOL_TEST=y commented, so i suposse default is "y"). Is it
enough to perform final client authentication with wpa_supplicant,
supossing the other config options ok?

well....and, when i put PCSC support, and after copying WinSCard library
from microsft sdk to mingw libraries folder, my compiler print this:

........

 -DINTERNAL_SHA256 -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_NAMED_PIPE
-DCONFIG_NATIVE_WINDOWS -DCONFIG_NO_FIPS186_2_PRF -DCONFIG_NO_T_PRF
-DCONFIG_NDIS_EVENTS_INTEGRATED   -c
-o ../src/utils/pcsc_funcs.o ../src/utils/pcsc_funcs.c
In file included from ../src/utils/pcsc_funcs.c:20:
/usr/include/PCSC/winscard.h:31: error: syntax error before
"LPSCARDCONTEXT"
/usr/include/PCSC/winscard.h:33: error: syntax error before "hContext"
/usr/include/PCSC/winscard.h:35: error: syntax error before "hContext"
/usr/include/PCSC/winscard.h:37: error: syntax error before "hContext"

.............

../src/utils/pcsc_funcs.c:93: error: syntax error before "SCARDCONTEXT"
../src/utils/pcsc_funcs.c:93: warning: no semicolon at end of struct or
union
../src/utils/pcsc_funcs.c:94: warning: type defaults to `int' in
declaration of `card'

I know that LPSCARDCONTEXT, for example, is in pcsclite.h. Looking into
pcsclite.h i see:

#ifdef WIN32
#include <winscard.h>
#else
	......some definitions, like LPSCARDCONTEXT

So, i suppose that my winscard.h is being including, and need some
definitions from somewhere. You can see that i have libpcsclite and
libpcsclite-dev installed, and pcsclite.h is sitting into PCSC/ dir.
i've tried to copy it into ddk/ folder but got the same result. Really i
think i'm missing something.

some help?

thank you
-------------- next part --------------
#1.-por lo visto ha funcionado, sin openssl en service pack 2
#2.-compila con tls


# Uncomment following two lines and fix the paths if you have installed OpenSSL
# or GnuTLS in non-default location
CFLAGS += -I/usr/local/ssl/include
LIBS += -L/usr/local/ssl/lib

LIBS +=  -leay32 -lssl32


# Driver interface for Windows NDIS
CONFIG_DRIVER_NDIS=y

# winpcap
CFLAGS += -I/home/sergius/mingw/WpdPack/Include
LIBS += -L/home/sergius/mingw/WpdPack/Lib

# For native build using mingw
CONFIG_NATIVE_WINDOWS=y

# Additional directories for cross-compilation on Linux host for mingw target
CFLAGS += -I/usr/i586-mingw32msvc/include/ddk
LIBS += -L/usr/i586-mingw32msvc/lib
CC=i586-mingw32msvc-gcc

# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is
# included)
CONFIG_IEEE8021X_EAPOL=y

# EAP-TLS
CONFIG_EAP_TLS=y

# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
CONFIG_PKCS12=y

# Smartcard support (i.e., private key on a smartcard), e.g., with openssl
# engine. NO REQUIERE PCSC
CONFIG_SMARTCARD=y

# PC/SC interface for smartcards (USIM, GSM SIM)
# Enable this if EAP-SIM or EAP-AKA is included
#sin esta opcion es capaz de ejecutarse!! pero a ver....si me traen el puto router
CONFIG_PCSC=y

CONFIG_NDIS_EVENTS_INTEGRATED=y
PLATFORMSDKLIB=/home/sergius/mingw/SDKmicrosoft/Lib


# Development testing
#CONFIG_EAPOL_TEST=y

# Select control interface backend for external programs, e.g, wpa_cli:
# unix = UNIX domain sockets (default for Linux/*BSD)
# udp = UDP sockets using localhost (127.0.0.1)
# named_pipe = Windows Named Pipe (default for Windows)
# y = use default (backwards compatibility)
# If this option is commented out, control interface is not included in the
# build.
CONFIG_CTRL_IFACE=y

# Select configuration backend:
# file = text file (e.g., wpa_supplicant.conf; note: the configuration file
#	path is given on command line, not here; this option is just used to
#	select the backend that allows configuration files to be used)
# winreg = Windows registry (see win_example.reg for an example)
CONFIG_BACKEND=file

# Select wrapper for operatins system and C library specific functions
# unix = UNIX/POSIX like systems (default)
# win32 = Windows systems
# none = Empty template
CONFIG_OS=win32

# Select event loop implementation
# eloop = select() loop (default)
# eloop_win = Windows events and WaitForMultipleObject() loop
# eloop_none = Empty template
CONFIG_ELOOP=eloop_win



More information about the Hostap mailing list