Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
fc90e42c
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fc90e42c
编写于
4月 15, 2012
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
e_aes_cbc_hmac_sha1.c: handle zero-length payload and engage empty frag
countermeasure. PR: 2778
上级
26e6bac1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
5 deletion
+11
-5
crypto/evp/e_aes_cbc_hmac_sha1.c
crypto/evp/e_aes_cbc_hmac_sha1.c
+5
-3
ssl/s3_pkt.c
ssl/s3_pkt.c
+6
-2
未找到文件。
crypto/evp/e_aes_cbc_hmac_sha1.c
浏览文件 @
fc90e42c
...
...
@@ -82,6 +82,8 @@ typedef struct
}
aux
;
}
EVP_AES_HMAC_SHA1
;
#define NO_PAYLOAD_LENGTH ((size_t)-1)
#if defined(AES_ASM) && ( \
defined(__x86_64) || defined(__x86_64__) || \
defined(_M_AMD64) || defined(_M_X64) || \
...
...
@@ -123,7 +125,7 @@ static int aesni_cbc_hmac_sha1_init_key(EVP_CIPHER_CTX *ctx,
key
->
tail
=
key
->
head
;
key
->
md
=
key
->
head
;
key
->
payload_length
=
0
;
key
->
payload_length
=
NO_PAYLOAD_LENGTH
;
return
ret
<
0
?
0
:
1
;
}
...
...
@@ -184,7 +186,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
if
(
len
%
AES_BLOCK_SIZE
)
return
0
;
if
(
ctx
->
encrypt
)
{
if
(
plen
==
0
)
if
(
plen
==
NO_PAYLOAD_LENGTH
)
plen
=
len
;
else
if
(
len
!=
((
plen
+
SHA_DIGEST_LENGTH
+
AES_BLOCK_SIZE
)
&-
AES_BLOCK_SIZE
))
return
0
;
...
...
@@ -270,7 +272,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
}
key
->
payload_length
=
0
;
key
->
payload_length
=
NO_PAYLOAD_LENGTH
;
return
1
;
}
...
...
ssl/s3_pkt.c
浏览文件 @
fc90e42c
...
...
@@ -664,10 +664,14 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
if
(
(
sess
==
NULL
)
||
(
s
->
enc_write_ctx
==
NULL
)
||
(
EVP_MD_CTX_md
(
s
->
write_hash
)
==
NULL
))
{
#if 1
clear
=
s
->
enc_write_ctx
?
0
:
1
;
/* must be AEAD cipher */
#else
clear
=
1
;
if
(
clear
)
#endif
mac_size
=
0
;
}
else
{
mac_size
=
EVP_MD_CTX_size
(
s
->
write_hash
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录