Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
02fb7cfe
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
接近 2 年 前同步成功
通知
12
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看板
提交
02fb7cfe
编写于
7月 13, 2016
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add OCSP accessors.
RT#4605 Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
e99ab8ff
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
0 deletion
+41
-0
crypto/ocsp/ocsp_cl.c
crypto/ocsp/ocsp_cl.c
+23
-0
doc/crypto/OCSP_resp_find_status.pod
doc/crypto/OCSP_resp_find_status.pod
+13
-0
include/openssl/ocsp.h
include/openssl/ocsp.h
+5
-0
未找到文件。
crypto/ocsp/ocsp_cl.c
浏览文件 @
02fb7cfe
...
...
@@ -191,6 +191,29 @@ ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(OCSP_BASICRESP* bs)
return
bs
->
tbsResponseData
.
producedAt
;
}
const
STACK_OF
(
X509
)
*
OCSP_resp_get0_certs
(
const
OCSP_BASICRESP
*
bs
)
{
return
bs
->
certs
;
}
int
OCSP_resp_get0_id
(
const
OCSP_BASICRESP
*
bs
,
const
ASN1_OCTET_STRING
**
pid
,
const
X509_NAME
**
pname
)
{
const
OCSP_RESPID
*
rid
=
&
bs
->
tbsResponseData
.
responderId
;
if
(
rid
->
type
==
V_OCSP_RESPID_NAME
)
{
*
pname
=
rid
->
value
.
byName
;
*
pid
=
NULL
;
}
else
if
(
rid
->
type
==
V_OCSP_RESPID_KEY
)
{
*
pid
=
rid
->
value
.
byKey
;
*
pname
=
NULL
;
}
else
{
return
0
;
}
return
1
;
}
/* Look single response matching a given certificate ID */
int
OCSP_resp_find
(
OCSP_BASICRESP
*
bs
,
OCSP_CERTID
*
id
,
int
last
)
...
...
doc/crypto/OCSP_resp_find_status.pod
浏览文件 @
02fb7cfe
...
...
@@ -27,6 +27,12 @@ OCSP_single_get0_status, OCSP_check_validity
ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(OCSP_BASICRESP* single);
const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
const ASN1_OCTET_STRING **pid,
const X509_NAME **pname);
int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
ASN1_GENERALIZEDTIME *nextupd,
long sec, long maxsec);
...
...
@@ -61,6 +67,13 @@ B<*revtime>, B<*thisupd> and B<*nextupd>.
OCSP_resp_get0_produced_at() extracts the B<producedAt> field from the
single response B<bs>.
OCSP_resp_get0_certs() returns any certificates included in B<bs>.
OCSP_resp_get0_id() gets the responder id of <bs>. If the responder ID is
a name then <*pname> is set to the name and B<*pid> is set to NULL. If the
responder ID is by key ID then B<*pid> is set to the key ID and B<*pname>
is set to NULL.
OCSP_check_validity() checks the validity of B<thisupd> and B<nextupd> values
which will be typically obtained from OCSP_resp_find_status() or
OCSP_single_get0_status(). If B<sec> is non-zero it indicates how many seconds
...
...
include/openssl/ocsp.h
浏览文件 @
02fb7cfe
...
...
@@ -213,6 +213,11 @@ ASN1_OCTET_STRING *OCSP_resp_get0_signature(OCSP_BASICRESP *bs);
int
OCSP_resp_count
(
OCSP_BASICRESP
*
bs
);
OCSP_SINGLERESP
*
OCSP_resp_get0
(
OCSP_BASICRESP
*
bs
,
int
idx
);
ASN1_GENERALIZEDTIME
*
OCSP_resp_get0_produced_at
(
OCSP_BASICRESP
*
bs
);
const
STACK_OF
(
X509
)
*
OCSP_resp_get0_certs
(
const
OCSP_BASICRESP
*
bs
);
int
OCSP_resp_get0_id
(
const
OCSP_BASICRESP
*
bs
,
const
ASN1_OCTET_STRING
**
pid
,
const
X509_NAME
**
pname
);
int
OCSP_resp_find
(
OCSP_BASICRESP
*
bs
,
OCSP_CERTID
*
id
,
int
last
);
int
OCSP_single_get0_status
(
OCSP_SINGLERESP
*
single
,
int
*
reason
,
ASN1_GENERALIZEDTIME
**
revtime
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录