<div dir="ltr">Hi!<br> <div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
</div>Did you build EAP-SIM code with PC/SC support? It looks like the<br>
Makefile used in the IKEv2 project does not support this. Please take a<br>
look at wpa_supplicant Makefile and CONFIG_PCSC option (you will need to<br>
add -DPCSC_FUNCS to CFLAGS and link in pcsc_funcs.o and add -lpcsclite<br>
to get the library in, too).<br>
<font color="#888888"><br>
--<br>
Jouni Malinen</font></blockquote><div><br>&nbsp;</div></div><br>I recompiled and installed libsupplicant library using these additions, i.e., <br><br>CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC<br>OBJS += pcsc_funcs.o<br># -lpthread may not be needed depending on how pcsc-lite was configured<br>
LIBS += -lpcsclite -lpthread<br><br>I built again ikev2 daemon, and I linked the new libsupplicant library. First time the build was not successful, because it wrote the follwoing errors:<br><br>gcc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -g -O2 -o ikev2 main.o message.o payload.o session.o sm.o message_msg.o -pthread&nbsp; -lsupplicant -L/usr/local/include/wpa/ ./.libs/libframework.a -L/usr/local/lib -lfl /usr/lib/<a href="http://libgthread-2.0.so">libgthread-2.0.so</a> -lpthread -lrt /usr/lib/<a href="http://libglib-2.0.so">libglib-2.0.so</a> -lcrypto -lssl /usr/local/lib/libcurl.so /usr/lib/libidn.so -lz<br>
/usr/local/lib/libsupplicant.so: undefined reference to `SCardConnect&#39;<br>/usr/local/lib/libsupplicant.so: undefined reference to `SCardTransmit&#39;<br>/usr/local/lib/libsupplicant.so: undefined reference to `SCardEstablishContext&#39;<br>
/usr/local/lib/libsupplicant.so: undefined reference to `SCardReleaseContext&#39;<br>/usr/local/lib/libsupplicant.so: undefined reference to `SCardDisconnect&#39;<br>/usr/local/lib/libsupplicant.so: undefined reference to `SCardListReaders&#39;<br>
/usr/local/lib/libsupplicant.so: undefined reference to `g_rgSCardT0Pci&#39;<br>/usr/local/lib/libsupplicant.so: undefined reference to `g_rgSCardT1Pci&#39;<br>collect2: ld returned 1 exit status<br>make[1]: *** [ikev2] Error 1<br>
<br>So I added during the configuration of ikev2 daemon the following includes and libraries:<br>CPPFLAGS+=-I/usr/include/PCSC&nbsp; LDFLAGS+=-lpcsclite<br><br>Finally, the build was sucessful.<br><br>I tried out again the deamon with the following eap.conf:<br>
network={<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #identity=&quot;<a href="mailto:1001011111111111@example.org">1001011111111111@example.org</a>&quot; //identity is not given<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key_mgmt=WPA-EAP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eap=SIM<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pin=&quot;1111&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pcsc=&quot;&quot;<br>}<br><br>And the authentication was again unsuccessful, with the following cause:<br><br>1223571959.850 supplicant INFO - EAP-SIM: Identity not configured<br>1223571959.850 supplicant INFO - CTRL-REQ-IDENTITY-0:Identity needed for SSID<br>
1223571959.850 supplicant DEBUG - EAP: method process -&gt; ignore=TRUE methodState=INIT decision=FAIL<br>1223571959.850 supplicant TRACE - get_bool: 321: called get_bool for variable EAPOL_eapRestart (0)<br>1223571959.850 supplicant TRACE - get_bool: 346: called get_bool for variable EAPOL_portEnabled (1)<br>
1223571959.850 supplicant DEBUG - EAP: EAP entering state DISCARD<br>1223571959.850 supplicant TRACE - set_bool: 407: called set_bool for variable EAPOL_eapReq (0)<br>1223571959.850 supplicant TRACE - set_bool: 401: called set_bool for variable EAPOL_eapNoResp (1)<br>
1223571959.850 supplicant TRACE - get_bool: 321: called get_bool for variable EAPOL_eapRestart (0)<br>1223571959.850 supplicant TRACE - get_bool: 346: called get_bool for variable EAPOL_portEnabled (1)<br>1223571959.850 supplicant DEBUG - EAP: EAP entering state IDLE<br>
1223571959.850 supplicant TRACE - get_bool: 321: called get_bool for variable EAPOL_eapRestart (0)<br>1223571959.850 supplicant TRACE - get_bool: 346: called get_bool for variable EAPOL_portEnabled (1)<br>1223571959.850 supplicant TRACE - get_bool: 341: called get_bool for variable EAPOL_eapReq (0)<br>
1223571959.850 supplicant TRACE - get_bool: 351: called get_bool for variable EAPOL_altAccept (0)<br>1223571959.850 supplicant TRACE - get_int: 441: called get_int for variable EAPOL_idleWhile (0)<br>1223571959.850 supplicant TRACE - get_bool: 356: called get_bool for variable EAPOL_altReject (0)<br>
1223571959.850 supplicant TRACE - get_int: 441: called get_int for variable EAPOL_idleWhile (0)<br>1223571959.850 supplicant DEBUG - EAP: EAP entering state FAILURE<br>1223571959.850 supplicant TRACE - set_bool: 389: called set_bool for variable EAPOL_eapFail (1)<br>
1223571959.850 supplicant TRACE - set_bool: 407: called set_bool for variable EAPOL_eapReq (0)<br>1223571959.850 supplicant TRACE - set_bool: 401: called set_bool for variable EAPOL_eapNoResp (1)<br>1223571959.850 supplicant INFO - CTRL-EVENT-EAP-FAILURE EAP authentication failed<br>
<br><br>I thought that it will work, but it is not the case. Do you know why?<br>Should an instance of wpa_supplicant run in order to catch that CTRL-EVENT?<br><br><br>Thank you for your help.<br>BR,<br>Zoltán Faigl<br></div>