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 09:57:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ad2c996bd89d1e61ce958b98d6b205a6747937ec
ad2c996b
1 parent
69071ae2
refine HMAC sha256 digest algorithm. 0.9.193
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
trunk/src/rtmp/srs_protocol_handshake.cpp
trunk/src/rtmp/srs_protocol_handshake.cpp
查看文件 @
ad2c996
...
...
@@ -70,7 +70,7 @@ namespace _srs_internal
0x93
,
0xB8
,
0xE6
,
0x36
,
0xCF
,
0xEB
,
0x31
,
0xAE
};
// 62
int
__openssl_HMACsha256
(
HMAC_CTX
*
ctx
,
const
void
*
data
,
int
data_size
,
const
void
*
key
,
int
key_size
,
void
*
digest
,
unsigned
int
*
digest_size
)
int
__openssl_HMACsha256
(
HMAC_CTX
*
ctx
,
const
void
*
data
,
int
data_size
,
void
*
digest
,
unsigned
int
*
digest_size
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -104,7 +104,7 @@ namespace _srs_internal
// use data to digest.
// @see ./crypto/sha/sha256t.c
// @see ./crypto/evp/digest.c
if
(
EVP_Digest
(
data
,
data_size
,
__
key
,
&
digest_size
,
EVP_sha256
(),
NULL
)
<
0
)
if
(
EVP_Digest
(
data
,
data_size
,
__
digest
,
&
digest_size
,
EVP_sha256
(),
NULL
)
<
0
)
{
ret
=
ERROR_OpenSslSha256EvpDigest
;
return
ret
;
...
...
@@ -122,7 +122,7 @@ namespace _srs_internal
return
ret
;
}
ret
=
__openssl_HMACsha256
(
&
ctx
,
data
,
data_size
,
__
key
,
key_size
,
__
digest
,
&
digest_size
);
ret
=
__openssl_HMACsha256
(
&
ctx
,
data
,
data_size
,
__digest
,
&
digest_size
);
HMAC_CTX_cleanup
(
&
ctx
);
if
(
ret
!=
ERROR_SUCCESS
)
{
...
...
请
注册
或
登录
后发表评论