diff --git a/Makefile.in b/Makefile.in index f6ee38c13166..63021c20aaac 100644 --- a/Makefile.in +++ b/Makefile.in @@ -30,9 +30,9 @@ runtest: test test/roc_driver$(EXE) -v >/dev/null test/replay_driver$(EXE) -v >/dev/null test/dtls_srtp_driver$(EXE) >/dev/null - cd test; $(abspath $(srcdir))/test/rtpw_test.sh >/dev/null + cd test; $(abspath $(srcdir))/test/rtpw_test.sh -w $(abspath $(srcdir))/test/words.txt >/dev/null ifeq (1, $(USE_OPENSSL)) - cd test; $(abspath $(srcdir))/test/rtpw_test_gcm.sh >/dev/null + cd test; $(abspath $(srcdir))/test/rtpw_test_gcm.sh -w $(abspath $(srcdir))/test/words.txt >/dev/null endif @echo "libsrtp2 test applications passed." $(MAKE) -C crypto runtest diff --git a/test/rtpw.c b/test/rtpw.c index 3b7ac6700b20..c1386528dc3d 100644 --- a/test/rtpw.c +++ b/test/rtpw.c @@ -8,7 +8,7 @@ * * This app is a simple RTP application intended only for testing * libsrtp. It reads one word at a time from words.txt (or - * whatever file is specified as DICT_FILE), and sends one word out + * whatever file is specified as DICT_FILE or with -w), and sends one word out * each USEC_RATE microseconds. Secure RTP protections can be * applied. See the usage() function for more details. * @@ -198,7 +198,7 @@ main (int argc, char *argv[]) { /* check args */ while (1) { - c = getopt_s(argc, argv, "b:k:rsgt:ae:ld:"); + c = getopt_s(argc, argv, "b:k:rsgt:ae:ld:w:"); if (c == -1) { break; } @@ -247,6 +247,9 @@ main (int argc, char *argv[]) { case 'l': do_list_mods = 1; break; + case 'w': + dictfile = optarg_s; + break; default: usage(argv[0]); } @@ -640,8 +643,9 @@ usage(char *string) { " -s act as rtp sender\n" " -r act as rtp receiver\n" " -l list debug modules\n" - " -d turn on debugging for module \n", - string, string); + " -d turn on debugging for module \n" + " -w use for input, rather than %s\n", + string, string, DICT_FILE); exit(1); }