Add EAP tests to automated test suite
authorAlan T. DeKok <aland@freeradius.org>
Fri, 6 May 2011 12:32:12 +0000 (14:32 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 6 May 2011 12:36:11 +0000 (14:36 +0200)
src/tests/Makefile
src/tests/eap-mschapv2.conf
src/tests/eap-ttls-pap.conf
src/tests/mschapv1
src/tests/peap-mschapv2.conf
src/tests/runtests.sh

index cb43cb0..e85139b 100644 (file)
@@ -18,7 +18,8 @@ ACCTPORT = $(shell expr $(PORT) + 1)
 
 EAPOL_TEST = eapol_test
 
-EAP_TLS_TESTS = eap-ttls-pap.conf eap-ttls-mschapv2.conf peap-mschapv2.conf
+EAP_TLS_TESTS = eap-ttls-pap.conf eap-mschapv2.conf \
+             eap-ttls-mschapv2.conf peap-mschapv2.conf
 
 SECRET = testing123
 
@@ -77,10 +78,18 @@ tests: ../../raddb/test.conf radiusd.kill
        @$(MAKE) radiusd.kill
        @rm -f ../../raddb/test.conf
 
+tests.eap: ../../raddb/test.conf radiusd.kill
+       @chmod a+x runtests.sh
+       @rm -f radius.log
+       @$(MAKE) radiusd.pid
+       @$(MAKE) eap
+       @$(MAKE) radiusd.kill
+       @rm -f ../../raddb/test.conf
+
 eap: $(EAP_TLS_TESTS)
-       $(EAPOL_TEST) -c eap-ttls-pap.conf -s $(SECRET) 
-       $(EAPOL_TEST) -c peap-mschapv2.conf -s $(SECRET)
-       $(EAPOL_TEST) -c eap-ttls-mschapv2.conf -s $(SECRET)
+       for x in $(EAP_TLS_TESTS); do \
+               $(EAPOL_TEST) -c $$x -p $(PORT) -s $(SECRET); \
+       done
 
 md5:
        $(EAPOL_TEST) -c eap-md5.conf -s $(SECRET) 
index 9e8826e..d9e4182 100644 (file)
@@ -6,5 +6,5 @@ network={
         key_mgmt=WPA-EAP
         eap=MSCHAPV2
         identity="bob"
-        password="hello"
+        password="bob"
 }
index 8def763..459fbbe 100644 (file)
@@ -2,7 +2,6 @@
 #   eapol_test -c eap-ttls-pap.conf -s testing123
 #
 network={
-        ssid="example"
         key_mgmt=WPA-EAP
         eap=TTLS
         identity="bob"
index f2592b8..338bf8a 100644 (file)
@@ -9,6 +9,8 @@
 #      MS-MPPE-Encryption-Policy = 0x00000001
 #      MS-MPPE-Encryption-Types = 0x00000006
 #
+#      NT Hash hash = 0x9a936faf344359a0f1e3c9b5585b9f1f
+#
 User-Name = "bob",
 MS-CHAP-Challenge = 0xb9634adc358b2ab3,
 MS-CHAP-Response = 0xb9010000000000000000000000000000000000000000000000007a42408782f745ef90a86fd21b0d9294132750f4af66a419
index 0b7b380..1bb6c80 100644 (file)
@@ -9,4 +9,5 @@ network={
         anonymous_identity="anonymous"
         password="bob"
         phase2="auth=MSCHAPV2"
+       phase1="peapver=0"
 }
index cb13ea5..17cbd2a 100755 (executable)
@@ -2,6 +2,7 @@
 
 PORT=12340
 HOME_PORT=12350
+SECRET=testing123
 
 rm -f verbose.log
 RCODE=0
@@ -43,7 +44,7 @@ do
    echo "-f .cache/$x" >> .bar
 done
 
-../main/radclient `cat .bar` -xFd . 127.0.0.1:$PORT auth testing123 > radclient.log 2>&1
+../main/radclient `cat .bar` -xFd . 127.0.0.1:$PORT auth $SECRET > radclient.log 2>&1
 
 for x in `cat .foo`
 do