Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
531d630b
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,发现更多精彩内容 >>
提交
531d630b
编写于
6月 18, 2001
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Provide an application-common setup function for engines and use it
everywhere.
上级
853b1eb4
变更
26
显示空白变更内容
内联
并排
Showing
26 changed file
with
55 addition
and
412 deletion
+55
-412
apps/apps.c
apps/apps.c
+29
-0
apps/apps.h
apps/apps.h
+1
-0
apps/ca.c
apps/ca.c
+1
-17
apps/dgst.c
apps/dgst.c
+1
-17
apps/dh.c
apps/dh.c
+1
-17
apps/dhparam.c
apps/dhparam.c
+1
-17
apps/dsa.c
apps/dsa.c
+1
-17
apps/dsaparam.c
apps/dsaparam.c
+1
-17
apps/enc.c
apps/enc.c
+1
-17
apps/gendh.c
apps/gendh.c
+1
-17
apps/gendsa.c
apps/gendsa.c
+1
-17
apps/genrsa.c
apps/genrsa.c
+1
-17
apps/pkcs12.c
apps/pkcs12.c
+1
-13
apps/pkcs7.c
apps/pkcs7.c
+1
-17
apps/pkcs8.c
apps/pkcs8.c
+1
-17
apps/rand.c
apps/rand.c
+1
-17
apps/req.c
apps/req.c
+1
-17
apps/rsa.c
apps/rsa.c
+1
-17
apps/rsautl.c
apps/rsautl.c
+1
-17
apps/s_client.c
apps/s_client.c
+1
-22
apps/s_server.c
apps/s_server.c
+1
-22
apps/smime.c
apps/smime.c
+1
-17
apps/speed.c
apps/speed.c
+2
-15
apps/spkac.c
apps/spkac.c
+1
-17
apps/verify.c
apps/verify.c
+1
-17
apps/x509.c
apps/x509.c
+1
-17
未找到文件。
apps/apps.c
浏览文件 @
531d630b
...
...
@@ -1037,3 +1037,32 @@ X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath)
X509_STORE_free
(
store
);
return
NULL
;
}
ENGINE
*
setup_engine
(
BIO
*
err
,
const
char
*
engine
,
int
debug
)
{
ENGINE
*
e
=
NULL
;
if
(
engine
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
return
NULL
;
}
if
(
debug
)
{
ENGINE_ctrl
(
e
,
ENGINE_CTRL_SET_LOGSTREAM
,
0
,
err
,
0
);
}
ENGINE_ctrl_cmd
(
e
,
"SET_USER_INTERFACE"
,
0
,
UI_OpenSSL
(),
0
,
1
);
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
err
,
"can't use that engine
\n
"
);
return
NULL
;
}
BIO_printf
(
err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
return
e
;
}
apps/apps.h
浏览文件 @
531d630b
...
...
@@ -176,6 +176,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
STACK_OF
(
X509
)
*
load_certs
(
BIO
*
err
,
const
char
*
file
,
int
format
,
const
char
*
pass
,
ENGINE
*
e
,
const
char
*
cert_descrip
);
X509_STORE
*
setup_verify
(
BIO
*
bp
,
char
*
CAfile
,
char
*
CApath
);
ENGINE
*
setup_engine
(
BIO
*
err
,
const
char
*
engine
,
int
debug
);
#define FORMAT_UNDEF 0
#define FORMAT_ASN1 1
...
...
apps/ca.c
浏览文件 @
531d630b
...
...
@@ -549,23 +549,7 @@ bad:
ERR_load_crypto_strings
();
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
err
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
err
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
/*****************************************************************/
if
(
configfile
==
NULL
)
configfile
=
getenv
(
"OPENSSL_CONF"
);
...
...
apps/dgst.c
浏览文件 @
531d630b
...
...
@@ -225,23 +225,7 @@ int MAIN(int argc, char **argv)
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
in
=
BIO_new
(
BIO_s_file
());
bmd
=
BIO_new
(
BIO_f_md
());
...
...
apps/dh.c
浏览文件 @
531d630b
...
...
@@ -174,23 +174,7 @@ bad:
ERR_load_crypto_strings
();
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
in
=
BIO_new
(
BIO_s_file
());
out
=
BIO_new
(
BIO_s_file
());
...
...
apps/dhparam.c
浏览文件 @
531d630b
...
...
@@ -257,23 +257,7 @@ bad:
ERR_load_crypto_strings
();
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
g
&&
!
num
)
num
=
DEFBITS
;
...
...
apps/dsa.c
浏览文件 @
531d630b
...
...
@@ -198,23 +198,7 @@ bad:
ERR_load_crypto_strings
();
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
ENGINE_setup
(
engine
,
bio_err
);
if
(
!
app_passwd
(
bio_err
,
passargin
,
passargout
,
&
passin
,
&
passout
))
{
BIO_printf
(
bio_err
,
"Error getting passwords
\n
"
);
...
...
apps/dsaparam.c
浏览文件 @
531d630b
...
...
@@ -232,23 +232,7 @@ bad:
}
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
ENGINE_setup
(
engine
,
bio_err
);
if
(
need_rand
)
{
...
...
apps/enc.c
浏览文件 @
531d630b
...
...
@@ -285,23 +285,7 @@ bad:
argv
++
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
bufsize
!=
NULL
)
{
...
...
apps/gendh.c
浏览文件 @
531d630b
...
...
@@ -143,23 +143,7 @@ bad:
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
out
=
BIO_new
(
BIO_s_file
());
if
(
out
==
NULL
)
...
...
apps/gendsa.c
浏览文件 @
531d630b
...
...
@@ -162,23 +162,7 @@ bad:
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
ENGINE_setup
(
engine
,
bio_err
);
if
(
!
app_passwd
(
bio_err
,
NULL
,
passargout
,
NULL
,
&
passout
))
{
BIO_printf
(
bio_err
,
"Error getting password
\n
"
);
...
...
apps/genrsa.c
浏览文件 @
531d630b
...
...
@@ -176,23 +176,7 @@ bad:
goto
err
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
err
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
err
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
outfile
==
NULL
)
{
...
...
apps/pkcs12.c
浏览文件 @
531d630b
...
...
@@ -300,19 +300,7 @@ int MAIN(int argc, char **argv)
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
passarg
)
{
if
(
export_cert
)
passargout
=
passarg
;
...
...
apps/pkcs7.c
浏览文件 @
531d630b
...
...
@@ -168,23 +168,7 @@ bad:
ERR_load_crypto_strings
();
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
in
=
BIO_new
(
BIO_s_file
());
out
=
BIO_new
(
BIO_s_file
());
...
...
apps/pkcs8.c
浏览文件 @
531d630b
...
...
@@ -185,23 +185,7 @@ int MAIN(int argc, char **argv)
return
(
1
);
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
return
(
1
);
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
return
(
1
);
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
!
app_passwd
(
bio_err
,
passargin
,
passargout
,
&
passin
,
&
passout
))
{
BIO_printf
(
bio_err
,
"Error getting passwords
\n
"
);
...
...
apps/rand.c
浏览文件 @
531d630b
...
...
@@ -101,23 +101,7 @@ int MAIN(int argc, char **argv)
goto
err
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
err
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
err
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
app_RAND_load_file
(
NULL
,
bio_err
,
(
inrand
!=
NULL
));
if
(
inrand
!=
NULL
)
...
...
apps/req.c
浏览文件 @
531d630b
...
...
@@ -586,23 +586,7 @@ bad:
if
((
in
==
NULL
)
||
(
out
==
NULL
))
goto
end
;
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
keyfile
!=
NULL
)
{
...
...
apps/rsa.c
浏览文件 @
531d630b
...
...
@@ -209,23 +209,7 @@ bad:
ERR_load_crypto_strings
();
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
!
app_passwd
(
bio_err
,
passargin
,
passargout
,
&
passin
,
&
passout
))
{
BIO_printf
(
bio_err
,
"Error getting passwords
\n
"
);
...
...
apps/rsautl.c
浏览文件 @
531d630b
...
...
@@ -157,23 +157,7 @@ int MAIN(int argc, char **argv)
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
/* FIXME: seed PRNG only if needed */
app_RAND_load_file
(
NULL
,
bio_err
,
0
);
...
...
apps/s_client.c
浏览文件 @
531d630b
...
...
@@ -382,28 +382,7 @@ bad:
OpenSSL_add_ssl_algorithms
();
SSL_load_error_strings
();
if
(
engine_id
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine_id
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\n
"
);
ERR_print_errors
(
bio_err
);
goto
end
;
}
if
(
c_debug
)
{
ENGINE_ctrl
(
e
,
ENGINE_CTRL_SET_LOGSTREAM
,
0
,
bio_err
,
0
);
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
ERR_print_errors
(
bio_err
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine_id
);
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine_id
,
1
);
ctx
=
SSL_CTX_new
(
meth
);
if
(
ctx
==
NULL
)
...
...
apps/s_server.c
浏览文件 @
531d630b
...
...
@@ -657,28 +657,7 @@ bad:
SSL_load_error_strings
();
OpenSSL_add_ssl_algorithms
();
if
(
engine_id
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine_id
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\n
"
);
ERR_print_errors
(
bio_err
);
goto
end
;
}
if
(
s_debug
)
{
ENGINE_ctrl
(
e
,
ENGINE_CTRL_SET_LOGSTREAM
,
0
,
bio_err
,
0
);
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
ERR_print_errors
(
bio_err
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine_id
);
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine_id
,
1
);
ctx
=
SSL_CTX_new
(
meth
);
if
(
ctx
==
NULL
)
...
...
apps/smime.c
浏览文件 @
531d630b
...
...
@@ -319,23 +319,7 @@ int MAIN(int argc, char **argv)
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
!
app_passwd
(
bio_err
,
passargin
,
NULL
,
&
passin
,
NULL
))
{
BIO_printf
(
bio_err
,
"Error getting password
\n
"
);
...
...
apps/speed.c
浏览文件 @
531d630b
...
...
@@ -505,21 +505,8 @@ int MAIN(int argc, char **argv)
BIO_printf
(
bio_err
,
"no engine given
\n
"
);
goto
end
;
}
if
((
e
=
ENGINE_by_id
(
*
argv
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
*
argv
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
*
argv
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
/* It will be increased again further down. We just
e
=
setup_engine
(
bio_err
,
*
argv
,
0
);
/* j will be increased again further down. We just
don't want speed to confuse an engine with an
algorithm, especially when none is given (which
means all of them should be run) */
...
...
apps/spkac.c
浏览文件 @
531d630b
...
...
@@ -179,23 +179,7 @@ bad:
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
keyfile
)
{
if
(
strcmp
(
keyfile
,
"-"
))
key
=
BIO_new_file
(
keyfile
,
"r"
);
...
...
apps/verify.c
浏览文件 @
531d630b
...
...
@@ -166,23 +166,7 @@ int MAIN(int argc, char **argv)
break
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
lookup
=
X509_STORE_add_lookup
(
cert_ctx
,
X509_LOOKUP_file
());
if
(
lookup
==
NULL
)
abort
();
...
...
apps/x509.c
浏览文件 @
531d630b
...
...
@@ -448,23 +448,7 @@ bad:
goto
end
;
}
if
(
engine
!=
NULL
)
{
if
((
e
=
ENGINE_by_id
(
engine
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"invalid engine
\"
%s
\"\n
"
,
engine
);
goto
end
;
}
if
(
!
ENGINE_set_default
(
e
,
ENGINE_METHOD_ALL
))
{
BIO_printf
(
bio_err
,
"can't use that engine
\n
"
);
goto
end
;
}
BIO_printf
(
bio_err
,
"engine
\"
%s
\"
set.
\n
"
,
engine
);
/* Free our "structural" reference. */
ENGINE_free
(
e
);
}
e
=
setup_engine
(
bio_err
,
engine
,
0
);
if
(
need_rand
)
app_RAND_load_file
(
NULL
,
bio_err
,
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录