Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
b4e88ccb
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b4e88ccb
编写于
3月 18, 2006
作者:
N
Nils Larsch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ensure the pointer is valid before using it
上级
d916ba1b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
12 deletion
+24
-12
apps/ts.c
apps/ts.c
+2
-0
crypto/bn/bntest.c
crypto/bn/bntest.c
+2
-0
crypto/ts/ts_rsp_sign.c
crypto/ts/ts_rsp_sign.c
+20
-12
未找到文件。
apps/ts.c
浏览文件 @
b4e88ccb
...
...
@@ -1041,6 +1041,8 @@ static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest,
if
(
!
(
request
=
d2i_TS_REQ_bio
(
input
,
NULL
)))
goto
err
;
if
(
!
(
ctx
=
TS_REQ_to_TS_VERIFY_CTX
(
request
,
NULL
)))
goto
err
;
}
else
return
NULL
;
/* Add the signature verification flag and arguments. */
ctx
->
flags
|=
TS_VFY_SIGNATURE
;
...
...
crypto/bn/bntest.c
浏览文件 @
b4e88ccb
...
...
@@ -732,6 +732,8 @@ int test_mont(BIO *bp, BN_CTX *ctx)
BN_init
(
&
n
);
mont
=
BN_MONT_CTX_new
();
if
(
mont
==
NULL
)
return
0
;
BN_bntest_rand
(
&
a
,
100
,
0
,
0
);
/**/
BN_bntest_rand
(
&
b
,
100
,
0
,
0
);
/**/
...
...
crypto/ts/ts_rsp_sign.c
浏览文件 @
b4e88ccb
...
...
@@ -466,18 +466,21 @@ TS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio)
if
(
!
result
)
{
TSerr
(
TS_F_TS_RESP_CREATE_RESPONSE
,
TS_R_RESPONSE_SETUP_ERROR
);
TS_RESP_CTX_set_status_info_cond
(
ctx
,
TS_STATUS_REJECTION
,
"Error during response "
"generation."
);
/* Check if the status info was set. */
if
(
ctx
->
response
&&
ASN1_INTEGER_get
(
TS_RESP_get_status_info
(
ctx
->
response
)
->
status
)
==
TS_STATUS_GRANTED
)
if
(
ctx
!=
NULL
)
{
/* Status info wasn't set, don't return a response. */
TS_RESP_free
(
ctx
->
response
);
ctx
->
response
=
NULL
;
TS_RESP_CTX_set_status_info_cond
(
ctx
,
TS_STATUS_REJECTION
,
"Error during response "
"generation."
);
/* Check if the status info was set. */
if
(
ctx
->
response
&&
ASN1_INTEGER_get
(
TS_RESP_get_status_info
(
ctx
->
response
)
->
status
)
==
TS_STATUS_GRANTED
)
{
/* Status info wasn't set, don't
* return a response. */
TS_RESP_free
(
ctx
->
response
);
ctx
->
response
=
NULL
;
}
}
}
response
=
ctx
->
response
;
...
...
@@ -567,13 +570,18 @@ static int TS_RESP_check_request(TS_RESP_CTX *ctx)
return
1
;
}
/* Returns the TSA policy based on the r
qe
uested and acceptable policies. */
/* Returns the TSA policy based on the r
eq
uested and acceptable policies. */
static
ASN1_OBJECT
*
TS_RESP_get_policy
(
TS_RESP_CTX
*
ctx
)
{
ASN1_OBJECT
*
requested
=
TS_REQ_get_policy_id
(
ctx
->
request
);
ASN1_OBJECT
*
policy
=
NULL
;
int
i
;
if
(
ctx
->
default_policy
==
NULL
)
{
TSerr
(
TS_F_TS_RESP_GET_POLICY
,
TS_R_INVALID_NULL_POINTER
);
return
NULL
;
}
/* Return the default policy if none is requested or the default is
requested. */
if
(
!
requested
||
!
OBJ_cmp
(
requested
,
ctx
->
default_policy
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录