cross-compiling with SMARTCARD or PCSC

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


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:


-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
/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
../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>
	......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

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

# For native build using mingw

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

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


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

# Smartcard support (i.e., private key on a smartcard), e.g., with openssl

# 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 me traen el puto router


# Development testing

# Select control interface backend for external programs, e.g, wpa_cli:
# unix = UNIX domain sockets (default for Linux/*BSD)
# udp = UDP sockets using localhost (
# 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.

# 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)

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

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

More information about the Hostap mailing list