From 8a8dee5a61292759e365f700d68fd4c58092cadd Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 27 Aug 2014 12:50:54 -0400 Subject: [PATCH] support sdes key change in simulations --- tests/simulator-ng.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/simulator-ng.pl b/tests/simulator-ng.pl index 38c8100e6..9c4572323 100755 --- a/tests/simulator-ng.pl +++ b/tests/simulator-ng.pl @@ -391,9 +391,12 @@ sub savp_sdp { } } - if (!$$ctx{out}{rtp_master_key}) { + if (!$$ctx{out}{rtp_master_key} || rand() < .2) { + $$ctx{out}{rtp_master_key} and print("new key\n"); $$ctx{out}{rtp_master_key} = rand_str(16); $$ctx{out}{rtp_master_salt} = rand_str(14); + undef($$ctx{out}{rtp_session_key}); + undef($$ctx{out}{rtcp_session_key}); if ($NOENC && $NOENC{rtp_master_key}) { $$ctx{out}{rtp_master_key} = $NOENC{rtp_master_key}; $$ctx{out}{rtp_master_salt} = $NOENC{rtp_master_salt};