summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2010-06-03 02:27:41 +0000
committerNanang Izzuddin <nanang@teluu.com>2010-06-03 02:27:41 +0000
commitecf56d5d9e9a5797e60c013489dd800bf9e02b7f (patch)
treeffd2f5a4f164defc78af2883dd1b11e9013557d0 /tests
parentd13c4adb1bbc08725e1ace9c3e773fff7a1f2b4e (diff)
Re #1074: Added python test for SRTP receiving too long key.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3193 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'tests')
-rw-r--r--tests/pjsua/scripts-sendto/323_srtp2_receive_too_long_key.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pjsua/scripts-sendto/323_srtp2_receive_too_long_key.py b/tests/pjsua/scripts-sendto/323_srtp2_receive_too_long_key.py
new file mode 100644
index 00000000..cf8bf487
--- /dev/null
+++ b/tests/pjsua/scripts-sendto/323_srtp2_receive_too_long_key.py
@@ -0,0 +1,25 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Too long key should be rejected
+sdp = \
+"""
+v=0
+o=- 0 0 IN IP4 127.0.0.1
+s=-
+c=IN IP4 127.0.0.1
+t=0 0
+m=audio 5000 RTP/SAVP 0
+a=crypto:1 aes_cm_128_hmac_sha1_80 inline:WnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQWnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQ
+"""
+
+pjsua_args = "--null-audio --auto-answer 200 --use-srtp 2 --srtp-secure 0"
+extra_headers = ""
+include = []
+exclude = []
+
+sendto_cfg = sip.SendtoCfg("SRTP receive too long key", pjsua_args, sdp, 406,
+ extra_headers=extra_headers,
+ resp_inc=include, resp_exc=exclude)
+