Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
52b621db
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
52b621db
编写于
2月 15, 2001
作者:
L
Lutz Jänicke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add "-rand" option to s_client and s_server.
上级
a6ed5dd6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
48 addition
and
2 deletion
+48
-2
apps/s_client.c
apps/s_client.c
+15
-1
apps/s_server.c
apps/s_server.c
+15
-1
doc/apps/s_client.pod
doc/apps/s_client.pod
+9
-0
doc/apps/s_server.pod
doc/apps/s_server.pod
+9
-0
未找到文件。
apps/s_client.c
浏览文件 @
52b621db
...
...
@@ -155,6 +155,7 @@ static void sc_usage(void)
BIO_printf
(
bio_err
,
" -cipher - preferred cipher to use, use the 'openssl ciphers'
\n
"
);
BIO_printf
(
bio_err
,
" command to see what is available
\n
"
);
BIO_printf
(
bio_err
,
" -engine id - Initialise and use the specified engine
\n
"
);
BIO_printf
(
bio_err
,
" -rand file%cfile%c...
\n
"
,
LIST_SEPARATOR_CHAR
,
LIST_SEPARATOR_CHAR
);
}
...
...
@@ -182,6 +183,7 @@ int MAIN(int argc, char **argv)
int
prexit
=
0
;
SSL_METHOD
*
meth
=
NULL
;
BIO
*
sbio
;
char
*
inrand
=
NULL
;
char
*
engine_id
=
NULL
;
ENGINE
*
e
=
NULL
;
#ifdef WINDOWS
...
...
@@ -328,6 +330,11 @@ int MAIN(int argc, char **argv)
if
(
--
argc
<
1
)
goto
bad
;
engine_id
=
*
(
++
argv
);
}
else
if
(
strcmp
(
*
argv
,
"-rand"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
inrand
=
*
(
++
argv
);
}
else
{
BIO_printf
(
bio_err
,
"unknown option %s
\n
"
,
*
argv
);
...
...
@@ -344,7 +351,14 @@ bad:
goto
end
;
}
app_RAND_load_file
(
NULL
,
bio_err
,
0
);
if
(
!
app_RAND_load_file
(
NULL
,
bio_err
,
1
)
&&
inrand
==
NULL
&&
!
RAND_status
())
{
BIO_printf
(
bio_err
,
"warning, not much extra random data, consider using the -rand option
\n
"
);
}
if
(
inrand
!=
NULL
)
BIO_printf
(
bio_err
,
"%ld semi-random bytes loaded
\n
"
,
app_RAND_load_files
(
inrand
));
if
(
bio_c_out
==
NULL
)
{
...
...
apps/s_server.c
浏览文件 @
52b621db
...
...
@@ -247,6 +247,7 @@ static void sv_usage(void)
BIO_printf
(
bio_err
,
" -www - Respond to a 'GET /' with a status page
\n
"
);
BIO_printf
(
bio_err
,
" -WWW - Respond to a 'GET /<path> HTTP/1.0' with file ./<path>
\n
"
);
BIO_printf
(
bio_err
,
" -engine id - Initialise and use the specified engine
\n
"
);
BIO_printf
(
bio_err
,
" -rand file%cfile%c...
\n
"
,
LIST_SEPARATOR_CHAR
,
LIST_SEPARATOR_CHAR
);
}
static
int
local_argc
=
0
;
...
...
@@ -417,6 +418,7 @@ int MAIN(int argc, char *argv[])
int
state
=
0
;
SSL_METHOD
*
meth
=
NULL
;
ENGINE
*
e
=
NULL
;
char
*
inrand
=
NULL
;
#if !defined(NO_SSL2) && !defined(NO_SSL3)
meth
=
SSLv23_server_method
();
...
...
@@ -575,6 +577,11 @@ int MAIN(int argc, char *argv[])
if
(
--
argc
<
1
)
goto
bad
;
engine_id
=
*
(
++
argv
);
}
else
if
(
strcmp
(
*
argv
,
"-rand"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
inrand
=
*
(
++
argv
);
}
else
{
BIO_printf
(
bio_err
,
"unknown option %s
\n
"
,
*
argv
);
...
...
@@ -591,7 +598,14 @@ bad:
goto
end
;
}
app_RAND_load_file
(
NULL
,
bio_err
,
0
);
if
(
!
app_RAND_load_file
(
NULL
,
bio_err
,
1
)
&&
inrand
==
NULL
&&
!
RAND_status
())
{
BIO_printf
(
bio_err
,
"warning, not much extra random data, consider using the -rand option
\n
"
);
}
if
(
inrand
!=
NULL
)
BIO_printf
(
bio_err
,
"%ld semi-random bytes loaded
\n
"
,
app_RAND_load_files
(
inrand
));
if
(
bio_s_out
==
NULL
)
{
...
...
doc/apps/s_client.pod
浏览文件 @
52b621db
...
...
@@ -33,6 +33,7 @@ B<openssl> B<s_client>
[B<-bugs>]
[B<-cipher cipherlist>]
[B<-engine id>]
[B<-rand file(s)>]
=head1 DESCRIPTION
...
...
@@ -164,6 +165,14 @@ to attempt to obtain a functional reference to the specified engine,
thus initialising it if needed. The engine will then be set as the default
for all available algorithms.
=item B<-rand file(s)>
a file or files containing random data used to seed the random number
generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>).
Multiple files can be specified separated by a OS-dependent character.
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
all others.
=back
=head1 CONNECTED COMMANDS
...
...
doc/apps/s_server.pod
浏览文件 @
52b621db
...
...
@@ -40,6 +40,7 @@ B<openssl> B<s_server>
[B<-www>]
[B<-WWW>]
[B<-engine id>]
[B<-rand file(s)>]
=head1 DESCRIPTION
...
...
@@ -194,6 +195,14 @@ to attempt to obtain a functional reference to the specified engine,
thus initialising it if needed. The engine will then be set as the default
for all available algorithms.
=item B<-rand file(s)>
a file or files containing random data used to seed the random number
generator, or an EGD socket (see L<RAND_egd(3)|RAND_egd(3)>).
Multiple files can be specified separated by a OS-dependent character.
The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
all others.
=back
=head1 CONNECTED COMMANDS
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录