]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
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:32:12 +0000 (14:32 +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 [changed mode: 0644->0755]

index cb43cb0b2e6b08d4197042681b7ebe0e25764d36..e85139bb02f53a90ef20f173e2a42909ff878a56 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 9e8826e1d609d638d008f0c8ffb000108f1ce664..d9e41825b2345cd5dac56c6f27a62dae23d72d48 100644 (file)
@@ -6,5 +6,5 @@ network={
         key_mgmt=WPA-EAP
         eap=MSCHAPV2
         identity="bob"
-        password="hello"
+        password="bob"
 }
index 8def76325e32fc0980b57da470fc576e765e102e..459fbbe521edb980f8016a3ba33c9545ca45c60f 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 f2592b8a71a57d876d2366e3cab81c8f6c0a9e42..338bf8ae8d6f77e6bf6b2546f2bda4e0d2e2bb3e 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 0b7b38007d85f79ebaf271bdf1b1937e3c8aa9c8..1bb6c807b92c93f466485256f2277e0789de13fd 100644 (file)
@@ -9,4 +9,5 @@ network={
         anonymous_identity="anonymous"
         password="bob"
         phase2="auth=MSCHAPV2"
+       phase1="peapver=0"
 }
old mode 100644 (file)
new mode 100755 (executable)
index cb13ea5..17cbd2a
@@ -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