Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-11-30 19:05:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6191e0af90b07fad6bff9d8878e9b33df688e504
6191e0af
1 parent
cafe886c
s1 compute key.
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
17 行增加
和
1 行删除
trunk/src/main/srs_main_server.cpp
trunk/src/protocol/srs_rtmp_handshake.cpp
trunk/src/main/srs_main_server.cpp
查看文件 @
6191e0a
...
...
@@ -222,6 +222,7 @@ void show_macro_features()
#endif
}
#include <srs_rtmp_handshake.hpp>
/**
* main entrance.
*/
...
...
@@ -229,6 +230,21 @@ int main(int argc, char** argv)
{
int
ret
=
ERROR_SUCCESS
;
_srs_internal
::
SrsDH
dh
;
dh
.
initialize
();
char
key
[
128
];
int
nb_key
=
128
;
dh
.
copy_public_key
(
key
,
nb_key
);
for
(
int
i
=
0
;
i
<
nb_key
;
i
++
)
{
printf
(
"%#x, "
,
(
unsigned
char
)
key
[
i
]);
if
(((
i
+
1
)
%
16
)
==
0
)
{
printf
(
"
\n
"
);
}
}
printf
(
"
\n
"
);
exit
(
0
);
// TODO: support both little and big endian.
srs_assert
(
srs_is_little_endian
());
...
...
trunk/src/protocol/srs_rtmp_handshake.cpp
查看文件 @
6191e0a
...
...
@@ -532,7 +532,7 @@ namespace _srs_internal
return
ret
;
}
// altough the public key is always 128bytes, but the share key maybe not.
// alt
h
ough the public key is always 128bytes, but the share key maybe not.
// we just ignore the actual key size, but if need to use the key, must use the actual size.
// TODO: FIXME: use the actual key size.
//srs_assert(pkey_size == 128);
...
...
请
注册
或
登录
后发表评论