From 6f2dc0046a169a21fc39cee76c5c2fd8ec0af8d7 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 20 Jan 2016 13:23:59 -0500 Subject: [PATCH] allow srtp-debug-helper to specify the ROC Change-Id: Iecef6446724fa86bfc9da408e6d41420b23afbe3 --- utils/srtp-debug-helper | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/srtp-debug-helper b/utils/srtp-debug-helper index 1c0794957..c0c795340 100755 --- a/utils/srtp-debug-helper +++ b/utils/srtp-debug-helper @@ -25,11 +25,14 @@ else { $pack = pack("H*", $pack); } +my $roc = $ARGV[3] // 0; + print("Packet length: " . length($pack) . " bytes\n"); -my ($dec, $roc, $tag, $hmac) = SRTP::decrypt_rtp($cs, $skey, $ssalt, $sauth, 0, $pack); +my ($dec, $roc, $tag, $hmac) = SRTP::decrypt_rtp($cs, $skey, $ssalt, $sauth, $roc, $pack); print("Auth tag from packet: " . unpack("H*", $tag) . "\n"); -print("Computer auth tag: " . unpack("H*", $hmac) . "\n"); +print("Computed auth tag: " . unpack("H*", $hmac) . "\n"); +print("Decoded packet: " . unpack("H*", $dec) . "\n");