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

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)

but with this code I get the response "0963c3a7b1481523f809e6affa7e792e" and 401 Unauthorized

Can you help me ?

解决方案

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",

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值