Adding MD5 test cases
diff --git a/src/test/builder/buildFsm.sh b/src/test/builder/buildFsm.sh
index 87bc14f..cba0577 100644
--- a/src/test/builder/buildFsm.sh
+++ b/src/test/builder/buildFsm.sh
@@ -12,9 +12,9 @@
##Generate DNS test state machine
-python yamlFsm.py -p DnsHolder -f noseDnsTest.yaml > ${odir}/noseDnsHolder.py
+#python yamlFsm.py -p DnsHolder -f noseDnsTest.yaml > ${odir}/noseDnsHolder.py
#Generate EAP MD5 authentication state machine
-python yamlFsm.py -p Md5AuthHolder -f noseMd5AuthTest.yaml > ${odir}/noseMd5AuthHolder.py
+python yamlFsm.py -p Md5AuthHolder -f noseMD5AuthTest.yaml > ${odir}/noseMd5AuthHolder.py
diff --git a/src/test/builder/noseMD5AuthTest.yaml b/src/test/builder/noseMD5AuthTest.yaml
new file mode 100644
index 0000000..7d43175
--- /dev/null
+++ b/src/test/builder/noseMD5AuthTest.yaml
@@ -0,0 +1,32 @@
+States:
+ ST_EAP_SETUP:
+ Events:
+ EVT_EAP_SETUP:
+ Actions:
+ - _eapSetup
+ NextState: ST_EAP_START
+ ST_EAP_START:
+ Events:
+ EVT_EAP_START:
+ Actions:
+ - _eapStart
+ NextState: ST_EAP_ID_REQ
+ ST_EAP_ID_REQ:
+ Events:
+ EVT_EAP_ID_REQ:
+ Actions:
+ - _eapIdReq
+ NextState: ST_EAP_MD5_CHALLENGE
+ ST_EAP_MD5_CHALLENGE:
+ Events:
+ EVT_EAP_MD5_CHALLENGE:
+ Actions:
+ - _eapMd5Challenge
+ NextState: ST_EAP_STATUS
+ ST_EAP_STATUS:
+ Events:
+ EVT_EAP_STATUS:
+ Actions:
+ - _eapStatus
+ NextState: ST_EAP_MD5_DONE
+
diff --git a/src/test/fsm/noseMd5AuthHolder.py b/src/test/fsm/noseMd5AuthHolder.py
new file mode 100644
index 0000000..908c25c
--- /dev/null
+++ b/src/test/fsm/noseMd5AuthHolder.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+def initMd5AuthHolderFsmTable(obj,St,Ev):
+ return {
+
+ ## CurrentState Event Actions NextState
+
+ (St.ST_EAP_SETUP, Ev.EVT_EAP_SETUP ):( (obj._eapSetup,), St.ST_EAP_START),
+
+ ## CurrentState Event Actions NextState
+
+ (St.ST_EAP_MD5_CHALLENGE, Ev.EVT_EAP_MD5_CHALLENGE ):( (obj._eapMd5Challenge,), St.ST_EAP_STATUS),
+
+ ## CurrentState Event Actions NextState
+
+ (St.ST_EAP_STATUS, Ev.EVT_EAP_STATUS ):( (obj._eapStatus,), St.ST_EAP_MD5_DONE),
+
+ ## CurrentState Event Actions NextState
+
+ (St.ST_EAP_ID_REQ, Ev.EVT_EAP_ID_REQ ):( (obj._eapIdReq,), St.ST_EAP_MD5_CHALLENGE),
+
+ ## CurrentState Event Actions NextState
+
+ (St.ST_EAP_START, Ev.EVT_EAP_START ):( (obj._eapStart,), St.ST_EAP_ID_REQ),
+
+}
+
diff --git a/src/test/md5/md5AuthTest.py b/src/test/md5/md5AuthTest.py
new file mode 100644
index 0000000..f4e9e8e
--- /dev/null
+++ b/src/test/md5/md5AuthTest.py
@@ -0,0 +1,23 @@
+import unittest
+import os,sys
+CORD_TEST_UTILS = 'utils'
+test_root = os.getenv('CORD_TEST_ROOT') or './'
+sys.path.append(test_root + CORD_TEST_UTILS)
+from EapMD5 import MD5AuthTest
+
+class eap_auth_exchange(unittest.TestCase):
+ def test_eap_md5(self):
+ t = MD5AuthTest()
+ t.runTest()
+ def test_eap_md5_wrg_password(self):
+ t = MD5AuthTest()
+ t._wrong_password()
+ t.runTest()
+
+if __name__ == '__main__':
+ t = MD5AuthTest()
+ t.runTest()
+ ####### Start the EAP-MD5 Negative testcase
+ t._wrong_password()
+ t.runTest()
+