RTSP身份验证:摘要问题 [英] RTSP Authentication : digest issue
本文介绍了RTSP身份验证:摘要问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要向流服务器验证我的RTSP流,这是挑战:
I need to authenticate my RTSP stream to a streaming server, here is the challenge :
RTSP/1.0 401 Unauthorized
WWW-Authenticate: Digest realm="Streaming Server", nonce="76bfe6986d3e766424de9bd6e7d3ccc1"
Session: 1845562184;timeout=60
Cseq: 1
...
有线广播成功使用这些设置进行身份验证:
Wirecast manage to successfully authenticate with those settings :
Host name : 192.168.33.9:1935/live/my_stream.sdp
location : live/my_stream.sdp
username : user
password : test
它的响应是:e1dff363b9763df0c7615429af79715c
its response is : e1dff363b9763df0c7615429af79715c
因此,根据维基百科,我尝试使用以下方法进行身份验证:
So according to wikipedia I tried to authenticate with the method :
//H(data) = MD5(data)
//KD(secret, data) = H(secret:data)
//A1 = username:realm:password
//A2 = http-method:uri
//response = KD( H(A1), nonce:H(A2))
HA1 = md5("user:Streaming Server:test")
HA2 = md5("POST:live/my_stream.sdp")
RESPONSE = md5(HA1+":"+nonce+":"+HA2)
但是使用此代码,我得到响应"0963c3a7b1481523f809e6affa7e792e"和401未经授权
but with this code I get the response "0963c3a7b1481523f809e6affa7e792e" and 401 Unauthorized
你能帮我吗?
推荐答案
假设您的摘要方法很好,您可以尝试使用以下参数进行回答:
Assuming your digest method is fine you can try to answer with those parameters :
Authorization: Digest
username="user",
realm="Streaming Server",
nonce="76bfe6986d3e766424de9bd6e7d3ccc1",
uri="rtsp://192.168.33.9:1935/live/my_stream.sdp",
这篇关于RTSP身份验证:摘要问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文