Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
e7adda52
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
9 个月 前同步成功
通知
8
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,体验更适合开发者的 AI 搜索 >>
提交
e7adda52
编写于
9月 30, 2007
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
DTLS RFC4347 requires client to use rame random field in reply to
HelloVerifyRequest.
上级
7432d073
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
6 deletion
+16
-6
ssl/d1_clnt.c
ssl/d1_clnt.c
+16
-6
未找到文件。
ssl/d1_clnt.c
浏览文件 @
e7adda52
...
...
@@ -120,7 +120,6 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/md5.h>
#include <openssl/bn.h>
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif
...
...
@@ -219,6 +218,8 @@ int dtls1_connect(SSL *s)
s
->
state
=
SSL3_ST_CW_CLNT_HELLO_A
;
s
->
ctx
->
stats
.
sess_connect
++
;
s
->
init_num
=
0
;
/* mark client_random uninitialized */
memset
(
s
->
s3
->
client_random
,
0
,
sizeof
(
s
->
s3
->
client_random
));
break
;
case
SSL3_ST_CW_CLNT_HELLO_A
:
...
...
@@ -421,6 +422,8 @@ int dtls1_connect(SSL *s)
s
->
s3
->
tmp
.
next_state
=
SSL3_ST_CR_FINISHED_A
;
}
s
->
init_num
=
0
;
/* mark client_random uninitialized */
memset
(
s
->
s3
->
client_random
,
0
,
sizeof
(
s
->
s3
->
client_random
));
break
;
case
SSL3_ST_CR_FINISHED_A
:
...
...
@@ -543,9 +546,16 @@ int dtls1_client_hello(SSL *s)
/* else use the pre-loaded session */
p
=
s
->
s3
->
client_random
;
Time
=
(
unsigned
long
)
time
(
NULL
);
/* Time */
l2n
(
Time
,
p
);
RAND_pseudo_bytes
(
p
,
SSL3_RANDOM_SIZE
-
sizeof
(
Time
));
/* if client_random is initialized, reuse it, we are
* required to use same upon reply to HelloVerify */
for
(
i
=
0
;
p
[
i
]
==
'\0'
&&
i
<
sizeof
(
s
->
s3
->
client_random
);
i
++
)
;
if
(
i
==
sizeof
(
s
->
s3
->
client_random
))
{
Time
=
(
unsigned
long
)
time
(
NULL
);
/* Time */
l2n
(
Time
,
p
);
RAND_pseudo_bytes
(
p
,
sizeof
(
s
->
s3
->
client_random
)
-
4
);
}
/* Do the message type and length last */
d
=
p
=
&
(
buf
[
DTLS1_HM_HEADER_LENGTH
]);
...
...
@@ -731,7 +741,7 @@ int dtls1_send_client_key_exchange(SSL *s)
s
->
session
->
master_key_length
=
sizeof
tmp_buf
;
q
=
p
;
/* Fix buf for TLS and
beyond
*/
/* Fix buf for TLS and
[incidentally] DTLS
*/
if
(
s
->
version
>
SSL3_VERSION
)
p
+=
2
;
n
=
RSA_public_encrypt
(
sizeof
tmp_buf
,
...
...
@@ -746,7 +756,7 @@ int dtls1_send_client_key_exchange(SSL *s)
goto
err
;
}
/* Fix buf for TLS and
beyond
*/
/* Fix buf for TLS and
[incidentally] DTLS
*/
if
(
s
->
version
>
SSL3_VERSION
)
{
s2n
(
n
,
q
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录