This project is read-only.

Bug in Digest Authentication in RTSP client


Hi there,

I was using you API, to verify our RTSP server. While trying to play a video stream, I noticed that there is a problem with the digest auth scheme on sending Setup command. While there was a successful Describe command send and response received, the following setup command should use the same authentication parameters (nonce and realm) for further communication, but the MMA RTSP client sends a Setup command with new and totally unknown to the server parameters and does not retry on failure. I have worked around it by making the setup command try again on authorization failure. I would suggest you to make a proper fix, since you are not following the digest standard.


aeastham wrote Sep 14, 2017 at 2:22 PM

The only change required to make Digest Authentication work is to line 3496 of RstpClient.cs -
                if (string.Compare(algorithm.Substring(9), "MD5", true).Equals(0)) algorithm = "MD5";
                if (string.Compare(algorithm.Substring(10), "MD5", true).Equals(0)) algorithm = "MD5";

juliusfriedman wrote Sep 15, 2017 at 11:58 AM

Thanks for reporting this and suggesting a fix.

If you were able to also provide a small unit test which proves this out I would be happy to review and commit it into the code.

Sorry for any inconvenience!