Skip to content

Conversation

@RogerHardiman
Copy link
Collaborator

The ONVIF Standard now includes SHA-256 as well as MD5 for Digest Authentication.
This change adds the ability to enable SHA-256 in the RtspCameraExample code.

It is tested with a patched ffmpeg library which adds SHA-256

There is one more change to follow, but that will be in a different PR.
That is where we have multiple WWW-Authenticate headers and tell RTSP clients that we can do both MD5 and SHA256, like some HikVision camera have, but that is for another time.

It has been a long time since I've done any Unit Tests so just wanted someone to cast their eye over this.

Thanks
Roger

Example in RtspCameraExample\RtspServer.cs

Will send either
  WWW-Authenticate with an algorithm of MD5 (the default)
or
  WWW-Authenticate with an alogirutm of SHA-256

Tested with a patched FFmpeg

TODO
Some ONVIF cameras now support RTSP where they send _both_ WWW-Authenticate headers with MD5 first, and SHA-256 second. This is not yet supported.
a) send a WWW-Authenticate with
@ngraziano ngraziano self-assigned this Jan 20, 2026
use "using" and raw string when there is a lot of "
@ngraziano ngraziano merged commit fed6ba9 into dotnetcore Jan 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants