Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
9a436c0f
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,发现更多精彩内容 >>
提交
9a436c0f
编写于
12月 13, 2011
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Back out redundant verification time change.
上级
7fd5df6b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
32 deletion
+4
-32
CHANGES
CHANGES
+0
-3
apps/verify.c
apps/verify.c
+4
-29
未找到文件。
CHANGES
浏览文件 @
9a436c0f
...
...
@@ -472,9 +472,6 @@
*) Add SRP support.
[Tom Wu <tjw@cs.stanford.edu> and Ben Laurie]
*) Add -attime option to openssl verify.
[Peter Eckersley <pde@eff.org> and Ben Laurie]
*) Add functions to copy EVP_PKEY_METHOD and retrieve flags and id.
[Steve Henson]
...
...
apps/verify.c
浏览文件 @
9a436c0f
...
...
@@ -72,7 +72,7 @@
static
int
MS_CALLBACK
cb
(
int
ok
,
X509_STORE_CTX
*
ctx
);
static
int
check
(
X509_STORE
*
ctx
,
char
*
file
,
STACK_OF
(
X509
)
*
uchain
,
STACK_OF
(
X509
)
*
tchain
,
STACK_OF
(
X509_CRL
)
*
crls
,
ENGINE
*
e
,
time_t
at_time
);
STACK_OF
(
X509_CRL
)
*
crls
,
ENGINE
*
e
);
static
int
v_verbose
=
0
,
vflags
=
0
;
int
MAIN
(
int
,
char
**
);
...
...
@@ -83,9 +83,6 @@ int MAIN(int argc, char **argv)
int
i
,
ret
=
1
,
badarg
=
0
;
char
*
CApath
=
NULL
,
*
CAfile
=
NULL
;
char
*
untfile
=
NULL
,
*
trustfile
=
NULL
,
*
crlfile
=
NULL
;
char
*
checktime_string
=
NULL
;
long
int
timestamp
;
time_t
t
=
0
;
STACK_OF
(
X509
)
*
untrusted
=
NULL
,
*
trusted
=
NULL
;
STACK_OF
(
X509_CRL
)
*
crls
=
NULL
;
X509_STORE
*
cert_ctx
=
NULL
;
...
...
@@ -148,11 +145,6 @@ int MAIN(int argc, char **argv)
if
(
argc
--
<
1
)
goto
end
;
crlfile
=
*
(
++
argv
);
}
else
if
(
strcmp
(
*
argv
,
"-attime"
)
==
0
)
{
if
(
argc
--
<
1
)
goto
end
;
checktime_string
=
*
(
++
argv
);
}
#ifndef OPENSSL_NO_ENGINE
else
if
(
strcmp
(
*
argv
,
"-engine"
)
==
0
)
{
...
...
@@ -230,28 +222,14 @@ int MAIN(int argc, char **argv)
goto
end
;
}
if
(
checktime_string
)
{
/* interpret the -attime argument as seconds since Epoch */
if
(
sscanf
(
checktime_string
,
"%li"
,
&
timestamp
)
!=
1
)
{
BIO_printf
(
bio_err
,
"Error parsing timestamp %s
\n
"
,
checktime_string
);
ERR_print_errors
(
bio_err
);
goto
end
;
}
t
=
(
time_t
)
timestamp
;
/* on some platforms time_t may be a float */
}
if
(
argc
<
1
)
check
(
cert_ctx
,
NULL
,
untrusted
,
trusted
,
crls
,
e
,
t
);
if
(
argc
<
1
)
check
(
cert_ctx
,
NULL
,
untrusted
,
trusted
,
crls
,
e
);
else
for
(
i
=
0
;
i
<
argc
;
i
++
)
check
(
cert_ctx
,
argv
[
i
],
untrusted
,
trusted
,
crls
,
e
,
t
);
check
(
cert_ctx
,
argv
[
i
],
untrusted
,
trusted
,
crls
,
e
);
ret
=
0
;
end:
if
(
ret
==
1
)
{
BIO_printf
(
bio_err
,
"usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check]"
);
BIO_printf
(
bio_err
,
" [-attime timestamp]"
);
#ifndef OPENSSL_NO_ENGINE
BIO_printf
(
bio_err
,
" [-engine e]"
);
#endif
...
...
@@ -288,7 +266,7 @@ end:
static
int
check
(
X509_STORE
*
ctx
,
char
*
file
,
STACK_OF
(
X509
)
*
uchain
,
STACK_OF
(
X509
)
*
tchain
,
STACK_OF
(
X509_CRL
)
*
crls
,
ENGINE
*
e
,
time_t
at_time
)
STACK_OF
(
X509_CRL
)
*
crls
,
ENGINE
*
e
)
{
X509
*
x
=
NULL
;
int
i
=
0
,
ret
=
0
;
...
...
@@ -314,9 +292,6 @@ static int check(X509_STORE *ctx, char *file,
if
(
tchain
)
X509_STORE_CTX_trusted_stack
(
csc
,
tchain
);
if
(
crls
)
X509_STORE_CTX_set0_crls
(
csc
,
crls
);
if
(
at_time
)
X509_STORE_CTX_set_time
(
csc
,
0
,
at_time
);
i
=
X509_verify_cert
(
csc
);
X509_STORE_CTX_free
(
csc
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录