Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
33826fd0
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,发现更多精彩内容 >>
提交
33826fd0
编写于
12月 14, 2012
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for '-' as input and output filenames in ocsp utility.
Recognise verification arguments.
上级
92821996
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
27 addition
and
4 deletion
+27
-4
apps/ocsp.c
apps/ocsp.c
+27
-4
未找到文件。
apps/ocsp.c
浏览文件 @
33826fd0
...
@@ -148,6 +148,7 @@ int MAIN(int argc, char **argv)
...
@@ -148,6 +148,7 @@ int MAIN(int argc, char **argv)
long
nsec
=
MAX_VALIDITY_PERIOD
,
maxage
=
-
1
;
long
nsec
=
MAX_VALIDITY_PERIOD
,
maxage
=
-
1
;
char
*
CAfile
=
NULL
,
*
CApath
=
NULL
;
char
*
CAfile
=
NULL
,
*
CApath
=
NULL
;
X509_STORE
*
store
=
NULL
;
X509_STORE
*
store
=
NULL
;
X509_VERIFY_PARAM
*
vpm
=
NULL
;
STACK_OF
(
X509
)
*
sign_other
=
NULL
,
*
verify_other
=
NULL
,
*
rother
=
NULL
;
STACK_OF
(
X509
)
*
sign_other
=
NULL
,
*
verify_other
=
NULL
,
*
rother
=
NULL
;
char
*
sign_certfile
=
NULL
,
*
verify_certfile
=
NULL
,
*
rcertfile
=
NULL
;
char
*
sign_certfile
=
NULL
,
*
verify_certfile
=
NULL
,
*
rcertfile
=
NULL
;
unsigned
long
sign_flags
=
0
,
verify_flags
=
0
,
rflags
=
0
;
unsigned
long
sign_flags
=
0
,
verify_flags
=
0
,
rflags
=
0
;
...
@@ -356,6 +357,12 @@ int MAIN(int argc, char **argv)
...
@@ -356,6 +357,12 @@ int MAIN(int argc, char **argv)
}
}
else
badarg
=
1
;
else
badarg
=
1
;
}
}
else
if
(
args_verify
(
&
args
,
NULL
,
&
badarg
,
bio_err
,
&
vpm
))
{
if
(
badarg
)
goto
end
;
continue
;
}
else
if
(
!
strcmp
(
*
args
,
"-validity_period"
))
else
if
(
!
strcmp
(
*
args
,
"-validity_period"
))
{
{
if
(
args
[
1
])
if
(
args
[
1
])
...
@@ -637,6 +644,9 @@ int MAIN(int argc, char **argv)
...
@@ -637,6 +644,9 @@ int MAIN(int argc, char **argv)
if
(
!
req
&&
reqin
)
if
(
!
req
&&
reqin
)
{
{
if
(
!
strcmp
(
reqin
,
"-"
))
derbio
=
BIO_new_fp
(
stdin
,
BIO_NOCLOSE
);
else
derbio
=
BIO_new_file
(
reqin
,
"rb"
);
derbio
=
BIO_new_file
(
reqin
,
"rb"
);
if
(
!
derbio
)
if
(
!
derbio
)
{
{
...
@@ -739,6 +749,9 @@ int MAIN(int argc, char **argv)
...
@@ -739,6 +749,9 @@ int MAIN(int argc, char **argv)
if
(
reqout
)
if
(
reqout
)
{
{
if
(
!
strcmp
(
respout
,
"-"
))
derbio
=
BIO_new_fp
(
stdout
,
BIO_NOCLOSE
);
else
derbio
=
BIO_new_file
(
reqout
,
"wb"
);
derbio
=
BIO_new_file
(
reqout
,
"wb"
);
if
(
!
derbio
)
if
(
!
derbio
)
{
{
...
@@ -782,6 +795,9 @@ int MAIN(int argc, char **argv)
...
@@ -782,6 +795,9 @@ int MAIN(int argc, char **argv)
}
}
else
if
(
respin
)
else
if
(
respin
)
{
{
if
(
!
strcmp
(
respin
,
"-"
))
derbio
=
BIO_new_fp
(
stdin
,
BIO_NOCLOSE
);
else
derbio
=
BIO_new_file
(
respin
,
"rb"
);
derbio
=
BIO_new_file
(
respin
,
"rb"
);
if
(
!
derbio
)
if
(
!
derbio
)
{
{
...
@@ -807,6 +823,9 @@ int MAIN(int argc, char **argv)
...
@@ -807,6 +823,9 @@ int MAIN(int argc, char **argv)
if
(
respout
)
if
(
respout
)
{
{
if
(
!
strcmp
(
respout
,
"-"
))
derbio
=
BIO_new_fp
(
stdout
,
BIO_NOCLOSE
);
else
derbio
=
BIO_new_file
(
respout
,
"wb"
);
derbio
=
BIO_new_file
(
respout
,
"wb"
);
if
(
!
derbio
)
if
(
!
derbio
)
{
{
...
@@ -854,6 +873,8 @@ int MAIN(int argc, char **argv)
...
@@ -854,6 +873,8 @@ int MAIN(int argc, char **argv)
store
=
setup_verify
(
bio_err
,
CAfile
,
CApath
);
store
=
setup_verify
(
bio_err
,
CAfile
,
CApath
);
if
(
!
store
)
if
(
!
store
)
goto
end
;
goto
end
;
if
(
vpm
)
X509_STORE_set1_param
(
store
,
vpm
);
if
(
verify_certfile
)
if
(
verify_certfile
)
{
{
verify_other
=
load_certs
(
bio_err
,
verify_certfile
,
FORMAT_PEM
,
verify_other
=
load_certs
(
bio_err
,
verify_certfile
,
FORMAT_PEM
,
...
@@ -904,6 +925,8 @@ end:
...
@@ -904,6 +925,8 @@ end:
ERR_print_errors
(
bio_err
);
ERR_print_errors
(
bio_err
);
X509_free
(
signer
);
X509_free
(
signer
);
X509_STORE_free
(
store
);
X509_STORE_free
(
store
);
if
(
vpm
)
X509_VERIFY_PARAM_free
(
vpm
);
EVP_PKEY_free
(
key
);
EVP_PKEY_free
(
key
);
EVP_PKEY_free
(
rkey
);
EVP_PKEY_free
(
rkey
);
X509_free
(
issuer
);
X509_free
(
issuer
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录