Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
36b5bb6f
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,发现更多精彩内容 >>
提交
36b5bb6f
编写于
12月 07, 2012
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
send out the raw SSL/TLS headers to the msg_callback and display them in SSL_trace
上级
30c278aa
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
10 deletion
+25
-10
ssl/s23_clnt.c
ssl/s23_clnt.c
+6
-0
ssl/s3_pkt.c
ssl/s3_pkt.c
+5
-0
ssl/ssl3.h
ssl/ssl3.h
+3
-0
ssl/t1_trce.c
ssl/t1_trce.c
+11
-10
未找到文件。
ssl/s23_clnt.c
浏览文件 @
36b5bb6f
...
@@ -587,7 +587,10 @@ static int ssl23_client_hello(SSL *s)
...
@@ -587,7 +587,10 @@ static int ssl23_client_hello(SSL *s)
if
(
ssl2_compat
)
if
(
ssl2_compat
)
s
->
msg_callback
(
1
,
SSL2_VERSION
,
0
,
s
->
init_buf
->
data
+
2
,
ret
-
2
,
s
,
s
->
msg_callback_arg
);
s
->
msg_callback
(
1
,
SSL2_VERSION
,
0
,
s
->
init_buf
->
data
+
2
,
ret
-
2
,
s
,
s
->
msg_callback_arg
);
else
else
{
s
->
msg_callback
(
1
,
version
,
SSL3_RT_HEADER
,
s
->
init_buf
->
data
,
5
,
s
,
s
->
msg_callback_arg
);
s
->
msg_callback
(
1
,
version
,
SSL3_RT_HANDSHAKE
,
s
->
init_buf
->
data
+
5
,
ret
-
5
,
s
,
s
->
msg_callback_arg
);
s
->
msg_callback
(
1
,
version
,
SSL3_RT_HANDSHAKE
,
s
->
init_buf
->
data
+
5
,
ret
-
5
,
s
,
s
->
msg_callback_arg
);
}
}
}
return
ret
;
return
ret
;
...
@@ -743,7 +746,10 @@ static int ssl23_get_server_hello(SSL *s)
...
@@ -743,7 +746,10 @@ static int ssl23_get_server_hello(SSL *s)
}
}
if
(
s
->
msg_callback
)
if
(
s
->
msg_callback
)
{
s
->
msg_callback
(
0
,
s
->
version
,
SSL3_RT_HEADER
,
p
,
5
,
s
,
s
->
msg_callback_arg
);
s
->
msg_callback
(
0
,
s
->
version
,
SSL3_RT_ALERT
,
p
+
5
,
2
,
s
,
s
->
msg_callback_arg
);
s
->
msg_callback
(
0
,
s
->
version
,
SSL3_RT_ALERT
,
p
+
5
,
2
,
s
,
s
->
msg_callback_arg
);
}
s
->
rwstate
=
SSL_NOTHING
;
s
->
rwstate
=
SSL_NOTHING
;
SSLerr
(
SSL_F_SSL23_GET_SERVER_HELLO
,
SSL_AD_REASON_OFFSET
+
p
[
6
]);
SSLerr
(
SSL_F_SSL23_GET_SERVER_HELLO
,
SSL_AD_REASON_OFFSET
+
p
[
6
]);
...
...
ssl/s3_pkt.c
浏览文件 @
36b5bb6f
...
@@ -321,6 +321,8 @@ again:
...
@@ -321,6 +321,8 @@ again:
s
->
rstate
=
SSL_ST_READ_BODY
;
s
->
rstate
=
SSL_ST_READ_BODY
;
p
=
s
->
packet
;
p
=
s
->
packet
;
if
(
s
->
msg_callback
)
s
->
msg_callback
(
0
,
0
,
SSL3_RT_HEADER
,
p
,
5
,
s
,
s
->
msg_callback_arg
);
/* Pull apart the header into the SSL3_RECORD */
/* Pull apart the header into the SSL3_RECORD */
rr
->
type
=
*
(
p
++
);
rr
->
type
=
*
(
p
++
);
...
@@ -822,6 +824,9 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
...
@@ -822,6 +824,9 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
/* record length after mac and block padding */
/* record length after mac and block padding */
s2n
(
wr
->
length
,
plen
);
s2n
(
wr
->
length
,
plen
);
if
(
s
->
msg_callback
)
s
->
msg_callback
(
1
,
0
,
SSL3_RT_HEADER
,
plen
-
5
,
5
,
s
,
s
->
msg_callback_arg
);
/* we should now have
/* we should now have
* wr->data pointing to the encrypted data, which is
* wr->data pointing to the encrypted data, which is
* wr->length long */
* wr->length long */
...
...
ssl/ssl3.h
浏览文件 @
36b5bb6f
...
@@ -338,6 +338,9 @@ extern "C" {
...
@@ -338,6 +338,9 @@ extern "C" {
#define TLS1_RT_CRYPTO_IV (TLS1_RT_CRYPTO | 0x7)
#define TLS1_RT_CRYPTO_IV (TLS1_RT_CRYPTO | 0x7)
#define TLS1_RT_CRYPTO_FIXED_IV (TLS1_RT_CRYPTO | 0x8)
#define TLS1_RT_CRYPTO_FIXED_IV (TLS1_RT_CRYPTO | 0x8)
/* Pseudo content type for SSL/TLS header info */
#define SSL3_RT_HEADER 0x100
#define SSL3_AL_WARNING 1
#define SSL3_AL_WARNING 1
#define SSL3_AL_FATAL 2
#define SSL3_AL_FATAL 2
...
...
ssl/t1_trce.c
浏览文件 @
36b5bb6f
...
@@ -1224,18 +1224,19 @@ void SSL_trace(int write_p, int version, int content_type,
...
@@ -1224,18 +1224,19 @@ void SSL_trace(int write_p, int version, int content_type,
msg
,
msglen
);
msg
,
msglen
);
return
;
return
;
}
}
BIO_printf
(
bio
,
"%s Record: Version = %s (0x%x)"
,
write_p
?
"Sent"
:
"Received"
,
ssl_trace_str
(
version
,
ssl_version_tbl
),
version
);
BIO_printf
(
bio
,
" Length=%d
\n
"
,
(
int
)
msglen
);
BIO_printf
(
bio
,
" Content Type = %s (%d)
\n
"
,
ssl_trace_str
(
content_type
,
ssl_content_tbl
),
content_type
);
switch
(
content_type
)
switch
(
content_type
)
{
{
case
SSL3_RT_HEADER
:
{
int
hvers
=
msg
[
1
]
<<
8
|
msg
[
2
];
BIO_puts
(
bio
,
write_p
?
"Sent"
:
"Received"
);
BIO_printf
(
bio
,
" Record
\n
Header:
\n
Version = %s (0x%x)
\n
"
,
ssl_trace_str
(
hvers
,
ssl_version_tbl
),
hvers
);
BIO_printf
(
bio
,
" Content Type = %s (%d)
\n
Length = %d"
,
ssl_trace_str
(
msg
[
0
],
ssl_content_tbl
),
msg
[
0
],
msg
[
3
]
<<
8
|
msg
[
4
]);
}
break
;
case
SSL3_RT_HANDSHAKE
:
case
SSL3_RT_HANDSHAKE
:
if
(
!
ssl_print_handshake
(
bio
,
ssl
,
msg
,
msglen
,
4
))
if
(
!
ssl_print_handshake
(
bio
,
ssl
,
msg
,
msglen
,
4
))
BIO_printf
(
bio
,
"Message length parse error!
\n
"
);
BIO_printf
(
bio
,
"Message length parse error!
\n
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录