cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.2k stars 472 forks source link

Fix typo introduced by PR 559 #562

Closed lminiero closed 2 years ago

lminiero commented 2 years ago

This PR fixes a typo introduced by #559, where for SRTP_AES_GCM_256 the returned length is SRTP_AES_ICM_256_KEY_LEN_WSALT instead of SRTP_AES_GCM_256_KEY_LEN_WSALT, which causes problems when SRTP sessions are created using AES-GCM-256.

pabuhler commented 2 years ago

strange there was no test to catch this :(

lminiero commented 2 years ago

strange there was no test to catch this :(

@pabuhler not sure, but my guess is this would have probably been tricky to catch using unit tests. We only noticed the issue when we were notified by someone using 2.4.1 about problems with srtp_unprotect on incoming RTCP on the server, but there were no reported failures in srtp_protect for outgoing RTP or RTCP for instance: when we worked on replicating the issue, we noticed media wouldn't work either, and that was because srtp_protect would "succeed", but then the browser would not render anything, because of failures to unprotect on that end.