Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
2a1a04e1
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,发现更多精彩内容 >>
提交
2a1a04e1
编写于
6月 28, 2015
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add full PSK trace support
Reviewed-by:
N
Matt Caswell
<
matt@openssl.org
>
上级
8a0a12e5
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
36 addition
and
13 deletion
+36
-13
ssl/t1_trce.c
ssl/t1_trce.c
+36
-13
未找到文件。
ssl/t1_trce.c
浏览文件 @
2a1a04e1
...
...
@@ -928,6 +928,18 @@ static int ssl_get_keyex(const char **pname, SSL *ssl)
*
pname
=
"PSK"
;
return
SSL_kPSK
;
}
if
(
alg_k
&
SSL_kRSAPSK
)
{
*
pname
=
"RSAPSK"
;
return
SSL_kRSAPSK
;
}
if
(
alg_k
&
SSL_kDHEPSK
)
{
*
pname
=
"DHEPSK"
;
return
SSL_kDHEPSK
;
}
if
(
alg_k
&
SSL_kECDHEPSK
)
{
*
pname
=
"ECDHEPSK"
;
return
SSL_kECDHEPSK
;
}
if
(
alg_k
&
SSL_kSRP
)
{
*
pname
=
"SRP"
;
return
SSL_kSRP
;
...
...
@@ -948,9 +960,15 @@ static int ssl_print_client_keyex(BIO *bio, int indent, SSL *ssl,
id
=
ssl_get_keyex
(
&
algname
,
ssl
);
BIO_indent
(
bio
,
indent
,
80
);
BIO_printf
(
bio
,
"KeyExchangeAlgorithm=%s
\n
"
,
algname
);
if
(
id
&
SSL_PSK
)
{
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"psk_identity"
,
2
,
&
msg
,
&
msglen
))
return
0
;
}
switch
(
id
)
{
case
SSL_kRSA
:
case
SSL_kRSAPSK
:
if
(
TLS1_get_version
(
ssl
)
==
SSL3_VERSION
)
{
ssl_print_hex
(
bio
,
indent
+
2
,
"EncyptedPreMasterSecret"
,
msg
,
msglen
);
...
...
@@ -971,6 +989,7 @@ static int ssl_print_client_keyex(BIO *bio, int indent, SSL *ssl,
break
;
}
case
SSL_kDHE
:
case
SSL_kDHEPSK
:
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"dh_Yc"
,
2
,
&
msg
,
&
msglen
))
return
0
;
break
;
...
...
@@ -983,19 +1002,14 @@ static int ssl_print_client_keyex(BIO *bio, int indent, SSL *ssl,
break
;
}
case
SSL_kECDHE
:
case
SSL_kECDHEPSK
:
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"ecdh_Yc"
,
1
,
&
msg
,
&
msglen
))
return
0
;
break
;
case
SSL_kPSK
:
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"psk_identity"
,
2
,
&
msg
,
&
msglen
))
return
0
;
break
;
}
return
1
;
return
!
msglen
;
}
static
int
ssl_print_server_keyex
(
BIO
*
bio
,
int
indent
,
SSL
*
ssl
,
...
...
@@ -1006,6 +1020,11 @@ static int ssl_print_server_keyex(BIO *bio, int indent, SSL *ssl,
id
=
ssl_get_keyex
(
&
algname
,
ssl
);
BIO_indent
(
bio
,
indent
,
80
);
BIO_printf
(
bio
,
"KeyExchangeAlgorithm=%s
\n
"
,
algname
);
if
(
id
&
SSL_PSK
)
{
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"psk_identity_hint"
,
2
,
&
msg
,
&
msglen
))
return
0
;
}
switch
(
id
)
{
/* Should never happen */
case
SSL_kDHd
:
...
...
@@ -1027,6 +1046,7 @@ static int ssl_print_server_keyex(BIO *bio, int indent, SSL *ssl,
break
;
case
SSL_kDHE
:
case
SSL_kDHEPSK
:
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"dh_p"
,
2
,
&
msg
,
&
msglen
))
return
0
;
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"dh_g"
,
2
,
&
msg
,
&
msglen
))
...
...
@@ -1036,6 +1056,7 @@ static int ssl_print_server_keyex(BIO *bio, int indent, SSL *ssl,
break
;
case
SSL_kECDHE
:
case
SSL_kECDHEPSK
:
if
(
msglen
<
1
)
return
0
;
BIO_indent
(
bio
,
indent
+
2
,
80
);
...
...
@@ -1054,17 +1075,19 @@ static int ssl_print_server_keyex(BIO *bio, int indent, SSL *ssl,
msglen
-=
3
;
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"point"
,
1
,
&
msg
,
&
msglen
))
return
0
;
}
else
{
BIO_printf
(
bio
,
"UNKNOWN CURVE PARAMETER TYPE %d
\n
"
,
msg
[
0
]);
return
0
;
}
break
;
case
SSL_kPSK
:
if
(
!
ssl_print_hexbuf
(
bio
,
indent
+
2
,
"psk_identity_hint"
,
2
,
&
msg
,
&
msglen
))
return
0
;
/* No signature */
return
1
;
case
SSL_kRSAPSK
:
break
;
}
return
ssl_print_signature
(
bio
,
indent
,
ssl
,
&
msg
,
&
msglen
);
if
(
!
(
id
&
SSL_PSK
))
ssl_print_signature
(
bio
,
indent
,
ssl
,
&
msg
,
&
msglen
);
return
!
msglen
;
}
static
int
ssl_print_certificate
(
BIO
*
bio
,
int
indent
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录