Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c7ac31e2
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
c7ac31e2
编写于
25年前
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bugfix: s_client occasionally would sleep in select() when it should
have checked SSL_pending() first. Submitted by: Reviewed by: PR:
上级
9d892e28
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
20 deletion
+29
-20
CHANGES
CHANGES
+4
-0
apps/s_client.c
apps/s_client.c
+25
-20
未找到文件。
CHANGES
浏览文件 @
c7ac31e2
...
...
@@ -5,6 +5,10 @@
Changes between 0.9.2b and 0.9.3
*) Bugfix: s_client occasionally would sleep in select() when
it should have checked SSL_pending() first.
[Bodo Moeller]
*) New functions DSA_do_sign and DSA_do_verify to provide access to
the raw DSA values prior to ASN.1 encoding.
[Ulf Möller]
...
...
This diff is collapsed.
Click to expand it.
apps/s_client.c
浏览文件 @
c7ac31e2
...
...
@@ -154,7 +154,7 @@ char **argv;
char
*
cert_file
=
NULL
,
*
key_file
=
NULL
;
char
*
CApath
=
NULL
,
*
CAfile
=
NULL
,
*
cipher
=
NULL
;
int
reconnect
=
0
,
badop
=
0
,
verify
=
SSL_VERIFY_NONE
,
bugs
=
0
;
int
write_tty
,
read_tty
,
write_ssl
,
read_ssl
,
tty_on
;
int
write_tty
,
read_tty
,
write_ssl
,
read_ssl
,
tty_on
,
ssl_pending
;
SSL_CTX
*
ctx
=
NULL
;
int
ret
=
1
,
in_init
=
1
,
i
,
nbio_test
=
0
;
SSL_METHOD
*
meth
=
NULL
;
...
...
@@ -439,31 +439,36 @@ re_start:
}
}
ssl_pending
=
read_ssl
&&
SSL_pending
(
con
);
if
(
!
ssl_pending
)
#ifndef WINDOWS
if
(
tty_on
)
{
if
(
read_tty
)
FD_SET
(
fileno
(
stdin
),
&
readfds
);
if
(
write_tty
)
FD_SET
(
fileno
(
stdout
),
&
writefds
);
}
if
(
tty_on
)
{
if
(
read_tty
)
FD_SET
(
fileno
(
stdin
),
&
readfds
);
if
(
write_tty
)
FD_SET
(
fileno
(
stdout
),
&
writefds
);
}
#endif
if
(
read_ssl
)
FD_SET
(
SSL_get_fd
(
con
),
&
readfds
);
if
(
write_ssl
)
FD_SET
(
SSL_get_fd
(
con
),
&
writefds
);
if
(
read_ssl
)
FD_SET
(
SSL_get_fd
(
con
),
&
readfds
);
if
(
write_ssl
)
FD_SET
(
SSL_get_fd
(
con
),
&
writefds
);
/* printf("mode tty(%d %d%d) ssl(%d%d)\n",
tty_on,read_tty,write_tty,read_ssl,write_ssl);*/
/*
printf("mode tty(%d %d%d) ssl(%d%d)\n",
tty_on,read_tty,write_tty,read_ssl,write_ssl);*/
i
=
select
(
width
,
&
readfds
,
&
writefds
,
NULL
,
NULL
);
if
(
i
<
0
)
{
BIO_printf
(
bio_err
,
"bad select %d
\n
"
,
i
=
select
(
width
,
&
readfds
,
&
writefds
,
NULL
,
NULL
);
if
(
i
<
0
)
{
BIO_printf
(
bio_err
,
"bad select %d
\n
"
,
get_last_socket_error
());
goto
shut
;
/* goto end; */
goto
shut
;
/* goto end; */
}
}
if
(
FD_ISSET
(
SSL_get_fd
(
con
),
&
writefds
))
if
(
!
ssl_pending
&&
FD_ISSET
(
SSL_get_fd
(
con
),
&
writefds
))
{
k
=
SSL_write
(
con
,
&
(
cbuf
[
cbuf_off
]),
(
unsigned
int
)
cbuf_len
);
...
...
@@ -531,7 +536,7 @@ re_start:
}
}
#ifndef WINDOWS
else
if
(
FD_ISSET
(
fileno
(
stdout
),
&
writefds
))
else
if
(
!
ssl_pending
&&
FD_ISSET
(
fileno
(
stdout
),
&
writefds
))
{
i
=
write
(
fileno
(
stdout
),
&
(
sbuf
[
sbuf_off
]),
sbuf_len
);
...
...
@@ -551,7 +556,7 @@ re_start:
}
}
#endif
else
if
(
FD_ISSET
(
SSL_get_fd
(
con
),
&
readfds
))
else
if
(
ssl_pending
||
FD_ISSET
(
SSL_get_fd
(
con
),
&
readfds
))
{
#ifdef RENEG
{
static
int
iiii
;
if
(
++
iiii
==
52
)
{
SSL_renegotiate
(
con
);
iiii
=
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部