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
2014-08-08 10:47:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7adbe7f45638235b09ac833839169b30c0dcd816
7adbe7f4
1 parent
ad2c996b
fix utest build failed, sync with src changed.
显示空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
6 行增加
和
25 行删除
trunk/src/core/srs_core.hpp
trunk/src/rtmp/srs_protocol_handshake.hpp
trunk/src/utest/srs_utest_protocol.cpp
trunk/src/core/srs_core.hpp
查看文件 @
7adbe7f
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR "0"
#define VERSION_MINOR "9"
#define VERSION_REVISION "19
3
"
#define VERSION_REVISION "19
4
"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
trunk/src/rtmp/srs_protocol_handshake.hpp
查看文件 @
7adbe7f
...
...
@@ -114,8 +114,8 @@ namespace _srs_internal
#define __SRS_OpensslHashSize 512
extern
u_int8_t
SrsGenuineFMSKey
[];
extern
u_int8_t
SrsGenuineFPKey
[];
int
openssl_HMACsha256
(
const
void
*
data
,
int
data_size
,
const
void
*
key
,
int
key_size
,
void
*
digest
);
int
openssl_generate_key
(
char
*
_private_key
,
char
*
_public_key
,
int32_t
size
);
int
openssl_HMACsha256
(
const
void
*
key
,
int
key_size
,
const
void
*
data
,
int
data_size
,
void
*
digest
);
int
openssl_generate_key
(
char
*
public_key
,
int32_t
size
);
// calc the offset of key,
// the key->offset cannot be used as the offset of key.
...
...
trunk/src/utest/srs_utest_protocol.cpp
查看文件 @
7adbe7f
...
...
@@ -222,8 +222,8 @@ VOID TEST(ProtocolHandshakeTest, OpensslSha256)
char
digest
[
__SRS_OpensslHashSize
];
ASSERT_EQ
(
ERROR_SUCCESS
,
openssl_HMACsha256
(
random_bytes
,
sizeof
(
random_bytes
),
SrsGenuineFPKey
,
30
,
random_bytes
,
sizeof
(
random_bytes
),
digest
)
);
...
...
@@ -238,30 +238,11 @@ VOID TEST(ProtocolHandshakeTest, OpensslSha256)
// verify the dh key
VOID
TEST
(
ProtocolHandshakeTest
,
DHKey
)
{
char
pri_key
[]
=
{
(
char
)
0x6e
,
(
char
)
0x65
,
(
char
)
0x69
,
(
char
)
0x2d
,
(
char
)
0x69
,
(
char
)
0x2d
,
(
char
)
0x69
,
(
char
)
0x73
,
(
char
)
0x6e
,
(
char
)
0x69
,
(
char
)
0x73
,
(
char
)
0x6c
,
(
char
)
0x65
,
(
char
)
0x72
,
(
char
)
0x69
,
(
char
)
0x72
,
(
char
)
0x76
,
(
char
)
0x65
,
(
char
)
0x72
,
(
char
)
0x69
,
(
char
)
0x77
,
(
char
)
0x74
,
(
char
)
0x2e
,
(
char
)
0x6e
,
(
char
)
0x72
,
(
char
)
0x76
,
(
char
)
0x72
,
(
char
)
0x65
,
(
char
)
0x72
,
(
char
)
0x70
,
(
char
)
0x72
,
(
char
)
0x69
,
(
char
)
0x69
,
(
char
)
0x70
,
(
char
)
0x72
,
(
char
)
0x73
,
(
char
)
0x6e
,
(
char
)
0x65
,
(
char
)
0x72
,
(
char
)
0x72
,
(
char
)
0x6e
,
(
char
)
0x2d
,
(
char
)
0x65
,
(
char
)
0x74
,
(
char
)
0x72
,
(
char
)
0x6c
,
(
char
)
0x69
,
(
char
)
0x74
,
(
char
)
0x69
,
(
char
)
0x65
,
(
char
)
0x40
,
(
char
)
0x69
,
(
char
)
0x69
,
(
char
)
0x76
,
(
char
)
0x77
,
(
char
)
0x2d
,
(
char
)
0x73
,
(
char
)
0x65
,
(
char
)
0x72
,
(
char
)
0x72
,
(
char
)
0x76
,
(
char
)
0x73
,
(
char
)
0x72
,
(
char
)
0x2e
,
(
char
)
0x2d
,
(
char
)
0x76
,
(
char
)
0x65
,
(
char
)
0x31
,
(
char
)
0x65
,
(
char
)
0x6d
,
(
char
)
0x6d
,
(
char
)
0x73
,
(
char
)
0x69
,
(
char
)
0x73
,
(
char
)
0x74
,
(
char
)
0x2e
,
(
char
)
0x74
,
(
char
)
0x72
,
(
char
)
0x65
,
(
char
)
0x65
,
(
char
)
0x72
,
(
char
)
0x65
,
(
char
)
0x2d
,
(
char
)
0x74
,
(
char
)
0x69
,
(
char
)
0x31
,
(
char
)
0x65
,
(
char
)
0x2d
,
(
char
)
0x6f
,
(
char
)
0x77
,
(
char
)
0x2e
,
(
char
)
0x76
,
(
char
)
0x77
,
(
char
)
0x2d
,
(
char
)
0x77
,
(
char
)
0x72
,
(
char
)
0x65
,
(
char
)
0x65
,
(
char
)
0x31
,
(
char
)
0x74
,
(
char
)
0x73
,
(
char
)
0x70
,
(
char
)
0x74
,
(
char
)
0x6e
,
(
char
)
0x72
,
(
char
)
0x6e
,
(
char
)
0x73
,
(
char
)
0x6d
,
(
char
)
0x2e
,
(
char
)
0x69
,
(
char
)
0x72
,
(
char
)
0x2d
,
(
char
)
0x65
,
(
char
)
0x69
,
(
char
)
0x77
,
(
char
)
0x69
,
(
char
)
0x76
,
(
char
)
0x72
,
(
char
)
0x77
,
(
char
)
0x72
,
(
char
)
0x32
,
(
char
)
0x6e
,
(
char
)
0x65
,
(
char
)
0x6c
,
(
char
)
0x2e
,
(
char
)
0x2d
,
(
char
)
0x6e
,
(
char
)
0x69
};
char
pub_key1
[
128
];
openssl_generate_key
(
p
ri_key
,
p
ub_key1
,
128
);
openssl_generate_key
(
pub_key1
,
128
);
char
pub_key2
[
128
];
openssl_generate_key
(
p
ri_key
,
p
ub_key2
,
128
);
openssl_generate_key
(
pub_key2
,
128
);
EXPECT_FALSE
(
srs_bytes_equals
(
pub_key1
,
pub_key2
,
128
));
}
...
...
请
注册
或
登录
后发表评论