RTSP 协议 认证 (三)--未完成

摘要认证(Digest Access Authentication):

摘要认证的主要交互过程如下:

#C->S:
#time: ms=2943728104 date=Fri, 26 Sep 2014 02:50:31 GMT
#server: ip=127.0.0.1 port=554
#client: ip=127.0.0.1 port=4004
DESCRIBE rtsp://127.0.0.1/xdb.mp4 RTSP/1.0\r\n
CSeq: 1\r\n
Accept: application/sdp\r\n
User-agent: None\r\n
\r\n


#S->C:
#time: ms=2943728113 date=Fri, 26 Sep 2014 02:50:31 GMT
RTSP/1.0 401 Unauthorized\r\n
Server: DSS/6.0.3 (Build/526.3; Platform/Win32; Release/Darwin Streaming Server;
 State/Development; )\r\n
Cseq: 1\r\n
WWW-Authenticate: Digest realm="Streaming Server", nonce="519f817f9b0056faedc34c
0451f6eaaa"\r\n
\r\n


#C->S:
#time: ms=2943728117 date=Fri, 26 Sep 2014 02:50:31 GMT
#server: ip=127.0.0.1 port=554
#client: ip=127.0.0.1 port=4004
DESCRIBE rtsp://127.0.0.1/xdb.mp4 RTSP/1.0\r\n
Authorization: Digest username="gd",realm="Streaming Server",nonce="519f817f9b00
56faedc34c0451f6eaaa",uri="/rtsp://127.0.0.1/xdb.mp4",response="d5f8651a05045401
cfc066f3de6bbee5"\r\n
CSeq: 1\r\n
Accept: application/sdp\r\n
User-agent: None\r\n
\r\n


#S->C:
#time: ms=2943728128 date=Fri, 26 Sep 2014 02:50:31 GMT
RTSP/1.0 200 OK\r\n
Server: DSS/6.0.3 (Build/526.3; Platform/Win32; Release/Darwin Streaming Server;
 State/Development; )\r\n
Cseq: 1\r\n
Last-Modified: Thu, 31 Jul 2014 07:07:41 GMT\r\n
Cache-Control: must-revalidate\r\n
Content-length: 830\r\n
Date: Fri, 26 Sep 2014 02:50:31 GMT\r\n
Expires: Fri, 26 Sep 2014 02:50:31 GMT\r\n
Content-Type: application/sdp\r\n
x-Accept-Retransmit: our-retransmit\r\n
x-Accept-Dynamic-Rate: 1\r\n
Content-Base: rtsp://127.0.0.1/xdb.mp4/\r\n
\r\n
v=0\r\n
o=StreamingServer 3620688630 1406790461000 IN IP4 127.0.0.1\r\n
s=\xdb.mp4\r\n
u=http:///\r\n
e=admin@\r\n
c=IN IP4 0.0.0.0\r\n
b=AS:545\r\n
t=0 0\r\n
a=control:*\r\n
a=x-copyright: MP4/3GP File hinted with GPAC 0.5.1-DEV-rev5322 (C)2000-2005 - ht
tp://gpac.sourceforge.net\r\n
a=range:npt=0- 256.02167\r\n
m=video 0 RTP/AVP 96\r\n
b=AS:497\r\n
a=3GPP-Adaptation-Support:1\r\n
a=rtpmap:96 H264/90000\r\n
a=control:trackID=65536\r\n
a=fmtp:96 profile-level-id=64001E; packetization-mode=1; sprop-parameter-sets=Z2
QAHqzIYCoMfkwEQAAAAwBAAAAMo8WLZ4A=,aOm7LIs=\r\n
a=framesize:96 672-378\r\n
m=audio 0 RTP/AVP 97\r\n
b=AS:48\r\n
a=3GPP-Adaptation-Support:1\r\n
a=rtpmap:97 mpeg4-generic/22050/2\r\n
a=control:trackID=65537\r\n
a=fmtp:97 profile-level-id=40; config=139056e5a54800; streamType=5; mode=AAC-hbr
; objectType=64; constantDuration=1024; sizeLength=13; indexLength=3; indexDelta
Length=3\r\n


#C->S:
#time: ms=2943728153 date=Fri, 26 Sep 2014 02:50:31 GMT
#server: ip=127.0.0.1 port=554
#client: ip=127.0.0.1 port=4004
SETUP rtsp://127.0.0.1/xdb.mp4/trackID=65536 RTSP/1.0\r\n
Authorization: Digest username="gd",realm="Streaming Server",nonce="519f817f9b00
56faedc34c0451f6eaaa",uri="/rtsp://127.0.0.1/xdb.mp4",response="30517a0c8bb478d2
fbd90b0af8fa6477"\r\n
CSeq: 3\r\n
Transport: RTP/AVP;unicast;client_port=6790-6791\r\n
User-agent: None\r\n
\r\n


#S->C:
#time: ms=2943728162 date=Fri, 26 Sep 2014 02:50:31 GMT
RTSP/1.0 200 OK\r\n
Server: DSS/6.0.3 (Build/526.3; Platform/Win32; Release/Darwin Streaming Server;
 State/Development; )\r\n
Cseq: 3\r\n
Last-Modified: Thu, 31 Jul 2014 07:07:41 GMT\r\n
Cache-Control: must-revalidate\r\n
Session: 68238440411231\r\n
Date: Fri, 26 Sep 2014 02:50:31 GMT\r\n
Expires: Fri, 26 Sep 2014 02:50:31 GMT\r\n
Transport: RTP/AVP;unicast;source=127.0.0.1;client_port=6790-6791;server_port=69
70-6971;ssrc=00005796\r\n
\r\n


#C->S:
#time: ms=2943728172 date=Fri, 26 Sep 2014 02:50:31 GMT
#server: ip=127.0.0.1 port=554
#client: ip=127.0.0.1 port=4004
SETUP rtsp://127.0.0.1/xdb.mp4/trackID=65537 RTSP/1.0\r\n
Authorization: Digest username="gd",realm="Streaming Server",nonce="519f817f9b00
56faedc34c0451f6eaaa",uri="/rtsp://127.0.0.1/xdb.mp4",response="30517a0c8bb478d2
fbd90b0af8fa6477"\r\n
CSeq: 4\r\n
Session: 68238440411231\r\n
Transport: RTP/AVP;unicast;client_port=6792-6793\r\n
User-agent: None\r\n
\r\n


#S->C:
#time: ms=2943728182 date=Fri, 26 Sep 2014 02:50:31 GMT
RTSP/1.0 200 OK\r\n
Server: DSS/6.0.3 (Build/526.3; Platform/Win32; Release/Darwin Streaming Server;
 State/Development; )\r\n
Cseq: 4\r\n
Session: 68238440411231\r\n
Last-Modified: Thu, 31 Jul 2014 07:07:41 GMT\r\n
Cache-Control: must-revalidate\r\n
Date: Fri, 26 Sep 2014 02:50:31 GMT\r\n
Expires: Fri, 26 Sep 2014 02:50:31 GMT\r\n
Transport: RTP/AVP;unicast;source=127.0.0.1;client_port=6792-6793;server_port=69
70-6971;ssrc=00004519\r\n
\r\n


#C->S:
#time: ms=2943728192 date=Fri, 26 Sep 2014 02:50:31 GMT
#server: ip=127.0.0.1 port=554
#client: ip=127.0.0.1 port=4004
PLAY rtsp://127.0.0.1/xdb.mp4 RTSP/1.0\r\n
Authorization: Digest username="gd",realm="Streaming Server",nonce="519f817f9b00
56faedc34c0451f6eaaa",uri="/rtsp://127.0.0.1/xdb.mp4",response="00173ce672477405
f4592f4e329dfa44"\r\n
CSeq: 5\r\n
Session: 68238440411231\r\n
Range: npt=0.0-\r\n
x-prebuffer: maxtime=3.0\r\n
User-agent: None\r\n
\r\n


#S->C:
#time: ms=2943728203 date=Fri, 26 Sep 2014 02:50:31 GMT
RTSP/1.0 200 OK\r\n
Server: DSS/6.0.3 (Build/526.3; Platform/Win32; Release/Darwin Streaming Server;
 State/Development; )\r\n
Cseq: 5\r\n
Session: 68238440411231\r\n
Range: npt=0.00000-256.02167\r\n
RTP-Info: url=rtsp://127.0.0.1/xdb.mp4/trackID=65536;seq=2400;rtptime=21527,url=
rtsp://127.0.0.1/xdb.mp4/trackID=65537;seq=11765;rtptime=9434\r\n
\r\n


#C->S:
#time: ms=2943728211 date=Fri, 26 Sep 2014 02:50:31 GMT
#server: ip=127.0.0.1 port=554
#client: ip=127.0.0.1 port=4004
TEARDOWN rtsp://127.0.0.1/xdb.mp4 RTSP/1.0\r\n
Authorization: Digest username="gd",realm="Streaming Server",nonce="519f817f9b00
56faedc34c0451f6eaaa",uri="/rtsp://127.0.0.1/xdb.mp4",response="efbe74ef1df56924
38d64093d5deefdd"\r\n
CSeq: 6\r\n
Session: 68238440411231\r\n
User-agent: None\r\n
\r\n


#S->C:
#time: ms=2943728219 date=Fri, 26 Sep 2014 02:50:31 GMT
RTSP/1.0 200 OK\r\n
Server: DSS/6.0.3 (Build/526.3; Platform/Win32; Release/Darwin Streaming Server;
 State/Development; )\r\n
Cseq: 6\r\n
Session: 68238440411231\r\n
Connection: Close\r\n
\r\n

(有待进一步分析)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值