Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
0e039aa7
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看板
提交
0e039aa7
编写于
10月 04, 2009
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix warnings about ignoring fgets return value
上级
c21869fb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
31 addition
and
10 deletion
+31
-10
apps/ca.c
apps/ca.c
+12
-2
apps/enc.c
apps/enc.c
+6
-1
apps/openssl.c
apps/openssl.c
+2
-1
apps/req.c
apps/req.c
+4
-2
crypto/ui/ui_openssl.c
crypto/ui/ui_openssl.c
+7
-4
未找到文件。
apps/ca.c
浏览文件 @
0e039aa7
...
...
@@ -1263,7 +1263,12 @@ bad:
BIO_printf
(
bio_err
,
"
\n
%d out of %d certificate requests certified, commit? [y/n]"
,
total_done
,
total
);
(
void
)
BIO_flush
(
bio_err
);
buf
[
0
][
0
]
=
'\0'
;
fgets
(
buf
[
0
],
10
,
stdin
);
if
(
!
fgets
(
buf
[
0
],
10
,
stdin
))
{
BIO_printf
(
bio_err
,
"CERTIFICATION CANCELED: I/O error
\n
"
);
ret
=
0
;
goto
err
;
}
if
((
buf
[
0
][
0
]
!=
'y'
)
&&
(
buf
[
0
][
0
]
!=
'Y'
))
{
BIO_printf
(
bio_err
,
"CERTIFICATION CANCELED
\n
"
);
...
...
@@ -2122,7 +2127,12 @@ again2:
BIO_printf
(
bio_err
,
"Sign the certificate? [y/n]:"
);
(
void
)
BIO_flush
(
bio_err
);
buf
[
0
]
=
'\0'
;
fgets
(
buf
,
sizeof
(
buf
)
-
1
,
stdin
);
if
(
!
fgets
(
buf
,
sizeof
(
buf
)
-
1
,
stdin
))
{
BIO_printf
(
bio_err
,
"CERTIFICATE WILL NOT BE CERTIFIED: I/O error
\n
"
);
ok
=
0
;
goto
err
;
}
if
(
!
((
buf
[
0
]
==
'y'
)
||
(
buf
[
0
]
==
'Y'
)))
{
BIO_printf
(
bio_err
,
"CERTIFICATE WILL NOT BE CERTIFIED
\n
"
);
...
...
apps/enc.c
浏览文件 @
0e039aa7
...
...
@@ -243,7 +243,12 @@ int MAIN(int argc, char **argv)
goto
bad
;
}
buf
[
0
]
=
'\0'
;
fgets
(
buf
,
sizeof
buf
,
infile
);
if
(
!
fgets
(
buf
,
sizeof
buf
,
infile
))
{
BIO_printf
(
bio_err
,
"unable to read key from '%s'
\n
"
,
file
);
goto
bad
;
}
fclose
(
infile
);
i
=
strlen
(
buf
);
if
((
i
>
0
)
&&
...
...
apps/openssl.c
浏览文件 @
0e039aa7
...
...
@@ -330,7 +330,8 @@ int main(int Argc, char *Argv[])
else
prompt
=
"OpenSSL> "
;
fputs
(
prompt
,
stdout
);
fflush
(
stdout
);
fgets
(
p
,
n
,
stdin
);
if
(
!
fgets
(
p
,
n
,
stdin
))
goto
end
;
if
(
p
[
0
]
==
'\0'
)
goto
end
;
i
=
strlen
(
p
);
if
(
i
<=
1
)
break
;
...
...
apps/req.c
浏览文件 @
0e039aa7
...
...
@@ -1441,7 +1441,8 @@ start:
buf
[
0
]
=
'\0'
;
if
(
!
batch
)
{
fgets
(
buf
,
sizeof
buf
,
stdin
);
if
(
!
fgets
(
buf
,
sizeof
buf
,
stdin
))
return
0
;
}
else
{
...
...
@@ -1499,7 +1500,8 @@ start:
buf
[
0
]
=
'\0'
;
if
(
!
batch
)
{
fgets
(
buf
,
sizeof
buf
,
stdin
);
if
(
!
fgets
(
buf
,
sizeof
buf
,
stdin
))
return
0
;
}
else
{
...
...
crypto/ui/ui_openssl.c
浏览文件 @
0e039aa7
...
...
@@ -299,7 +299,7 @@ static int is_a_tty;
/* Declare static functions */
#if !defined(OPENSSL_SYS_WIN16) && !defined(OPENSSL_SYS_WINCE)
static
void
read_till_nl
(
FILE
*
);
static
int
read_till_nl
(
FILE
*
);
static
void
recsig
(
int
);
static
void
pushsig
(
void
);
static
void
popsig
(
void
);
...
...
@@ -392,14 +392,16 @@ static int read_string(UI *ui, UI_STRING *uis)
#if !defined(OPENSSL_SYS_WIN16) && !defined(OPENSSL_SYS_WINCE)
/* Internal functions to read a string without echoing */
static
void
read_till_nl
(
FILE
*
in
)
static
int
read_till_nl
(
FILE
*
in
)
{
#define SIZE 4
char
buf
[
SIZE
+
1
];
do
{
fgets
(
buf
,
SIZE
,
in
);
if
(
!
fgets
(
buf
,
SIZE
,
in
))
return
0
;
}
while
(
strchr
(
buf
,
'\n'
)
==
NULL
);
return
1
;
}
static
volatile
sig_atomic_t
intr_signal
;
...
...
@@ -447,7 +449,8 @@ static int read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl)
*
p
=
'\0'
;
}
else
read_till_nl
(
tty_in
);
if
(
!
read_till_nl
(
tty_in
))
goto
error
;
if
(
UI_set_result
(
ui
,
uis
,
result
)
>=
0
)
ok
=
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录