Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
6d114240
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
6d114240
编写于
5月 31, 1999
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stack.
上级
426edadf
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
26 addition
and
19 deletion
+26
-19
apps/crl2p7.c
apps/crl2p7.c
+3
-3
apps/pkcs7.c
apps/pkcs7.c
+3
-3
crypto/asn1/p7_s_e.c
crypto/asn1/p7_s_e.c
+5
-4
crypto/asn1/p7_signd.c
crypto/asn1/p7_signd.c
+7
-4
crypto/pkcs7/pk7_lib.c
crypto/pkcs7/pk7_lib.c
+3
-3
crypto/pkcs7/pkcs7.h
crypto/pkcs7/pkcs7.h
+2
-2
crypto/x509/x509.h
crypto/x509/x509.h
+3
-0
未找到文件。
apps/crl2p7.c
浏览文件 @
6d114240
...
...
@@ -92,7 +92,7 @@ int MAIN(int argc, char **argv)
PKCS7_SIGNED
*
p7s
=
NULL
;
X509_CRL
*
crl
=
NULL
;
STACK
*
certflst
=
NULL
;
STACK
*
crl_stack
=
NULL
;
STACK
_OF
(
X509_CRL
)
*
crl_stack
=
NULL
;
STACK_OF
(
X509
)
*
cert_stack
=
NULL
;
int
ret
=
1
,
nocrl
=
0
;
...
...
@@ -213,11 +213,11 @@ bad:
p7s
->
contents
->
type
=
OBJ_nid2obj
(
NID_pkcs7_data
);
if
(
!
ASN1_INTEGER_set
(
p7s
->
version
,
1
))
goto
end
;
if
((
crl_stack
=
sk_new
(
NULL
))
==
NULL
)
goto
end
;
if
((
crl_stack
=
sk_
X509_CRL_
new
(
NULL
))
==
NULL
)
goto
end
;
p7s
->
crl
=
crl_stack
;
if
(
crl
!=
NULL
)
{
sk_
push
(
crl_stack
,(
char
*
)
crl
);
sk_
X509_CRL_push
(
crl_stack
,
crl
);
crl
=
NULL
;
/* now part of p7 for Freeing */
}
...
...
apps/pkcs7.c
浏览文件 @
6d114240
...
...
@@ -222,7 +222,7 @@ bad:
if
(
print_certs
)
{
STACK_OF
(
X509
)
*
certs
=
NULL
;
STACK
*
crls
=
NULL
;
STACK
_OF
(
X509_CRL
)
*
crls
=
NULL
;
i
=
OBJ_obj2nid
(
p7
->
type
);
switch
(
i
)
...
...
@@ -266,9 +266,9 @@ bad:
{
X509_CRL
*
crl
;
for
(
i
=
0
;
i
<
sk_num
(
crls
);
i
++
)
for
(
i
=
0
;
i
<
sk_
X509_CRL_
num
(
crls
);
i
++
)
{
crl
=
(
X509_CRL
*
)
sk
_value
(
crls
,
i
);
crl
=
sk_X509_CRL
_value
(
crls
,
i
);
X509_NAME_oneline
(
crl
->
crl
->
issuer
,
buf
,
256
);
BIO_puts
(
out
,
"issuer= "
);
...
...
crypto/asn1/p7_s_e.c
浏览文件 @
6d114240
...
...
@@ -70,7 +70,7 @@ int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp)
M_ASN1_I2D_len_SET_type
(
X509_ALGOR
,
a
->
md_algs
,
i2d_X509_ALGOR
);
M_ASN1_I2D_len
(
a
->
enc_data
,
i2d_PKCS7_ENC_CONTENT
);
M_ASN1_I2D_len_IMP_SEQUENCE_opt_type
(
X509
,
a
->
cert
,
i2d_X509
,
0
);
M_ASN1_I2D_len_IMP_SET_opt
(
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_len_IMP_SET_opt
_type
(
X509_CRL
,
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_len_SET
(
a
->
signer_info
,
i2d_PKCS7_SIGNER_INFO
);
M_ASN1_I2D_seq_total
();
...
...
@@ -80,7 +80,7 @@ int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp)
M_ASN1_I2D_put_SET_type
(
X509_ALGOR
,
a
->
md_algs
,
i2d_X509_ALGOR
);
M_ASN1_I2D_put
(
a
->
enc_data
,
i2d_PKCS7_ENC_CONTENT
);
M_ASN1_I2D_put_IMP_SEQUENCE_opt_type
(
X509
,
a
->
cert
,
i2d_X509
,
0
);
M_ASN1_I2D_put_IMP_SET_opt
(
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_put_IMP_SET_opt
_type
(
X509_CRL
,
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_put_SET
(
a
->
signer_info
,
i2d_PKCS7_SIGNER_INFO
);
M_ASN1_I2D_finish
();
...
...
@@ -100,7 +100,8 @@ PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a,
X509_ALGOR_free
);
M_ASN1_D2I_get
(
ret
->
enc_data
,
d2i_PKCS7_ENC_CONTENT
);
M_ASN1_D2I_get_IMP_set_opt_type
(
X509
,
ret
->
cert
,
d2i_X509
,
X509_free
,
0
);
M_ASN1_D2I_get_IMP_set_opt
(
ret
->
crl
,
d2i_X509_CRL
,
X509_CRL_free
,
1
);
M_ASN1_D2I_get_IMP_set_opt_type
(
X509_CRL
,
ret
->
crl
,
d2i_X509_CRL
,
X509_CRL_free
,
1
);
M_ASN1_D2I_get_set
(
ret
->
signer_info
,
d2i_PKCS7_SIGNER_INFO
,
PKCS7_SIGNER_INFO_free
);
...
...
@@ -133,7 +134,7 @@ void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a)
sk_X509_ALGOR_pop_free
(
a
->
md_algs
,
X509_ALGOR_free
);
PKCS7_ENC_CONTENT_free
(
a
->
enc_data
);
sk_X509_pop_free
(
a
->
cert
,
X509_free
);
sk_pop_free
(
a
->
crl
,
X509_CRL_free
);
sk_
X509_CRL_
pop_free
(
a
->
crl
,
X509_CRL_free
);
sk_pop_free
(
a
->
signer_info
,
PKCS7_SIGNER_INFO_free
);
Free
((
char
*
)
a
);
}
...
...
crypto/asn1/p7_signd.c
浏览文件 @
6d114240
...
...
@@ -69,7 +69,7 @@ int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **pp)
M_ASN1_I2D_len_SET_type
(
X509_ALGOR
,
a
->
md_algs
,
i2d_X509_ALGOR
);
M_ASN1_I2D_len
(
a
->
contents
,
i2d_PKCS7
);
M_ASN1_I2D_len_IMP_SEQUENCE_opt_type
(
X509
,
a
->
cert
,
i2d_X509
,
0
);
M_ASN1_I2D_len_IMP_SET_opt
(
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_len_IMP_SET_opt
_type
(
X509_CRL
,
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_len_SET
(
a
->
signer_info
,
i2d_PKCS7_SIGNER_INFO
);
M_ASN1_I2D_seq_total
();
...
...
@@ -78,7 +78,7 @@ int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **pp)
M_ASN1_I2D_put_SET_type
(
X509_ALGOR
,
a
->
md_algs
,
i2d_X509_ALGOR
);
M_ASN1_I2D_put
(
a
->
contents
,
i2d_PKCS7
);
M_ASN1_I2D_put_IMP_SEQUENCE_opt_type
(
X509
,
a
->
cert
,
i2d_X509
,
0
);
M_ASN1_I2D_put_IMP_SET_opt
(
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_put_IMP_SET_opt
_type
(
X509_CRL
,
a
->
crl
,
i2d_X509_CRL
,
1
);
M_ASN1_I2D_put_SET
(
a
->
signer_info
,
i2d_PKCS7_SIGNER_INFO
);
M_ASN1_I2D_finish
();
...
...
@@ -96,7 +96,8 @@ PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, unsigned char **pp,
X509_ALGOR_free
);
M_ASN1_D2I_get
(
ret
->
contents
,
d2i_PKCS7
);
M_ASN1_D2I_get_IMP_set_opt_type
(
X509
,
ret
->
cert
,
d2i_X509
,
X509_free
,
0
);
M_ASN1_D2I_get_IMP_set_opt
(
ret
->
crl
,
d2i_X509_CRL
,
X509_CRL_free
,
1
);
M_ASN1_D2I_get_IMP_set_opt_type
(
X509_CRL
,
ret
->
crl
,
d2i_X509_CRL
,
X509_CRL_free
,
1
);
M_ASN1_D2I_get_set
(
ret
->
signer_info
,
d2i_PKCS7_SIGNER_INFO
,
PKCS7_SIGNER_INFO_free
);
...
...
@@ -126,10 +127,12 @@ void PKCS7_SIGNED_free(PKCS7_SIGNED *a)
sk_X509_ALGOR_pop_free
(
a
->
md_algs
,
X509_ALGOR_free
);
PKCS7_free
(
a
->
contents
);
sk_X509_pop_free
(
a
->
cert
,
X509_free
);
sk_pop_free
(
a
->
crl
,
X509_CRL_free
);
sk_
X509_CRL_
pop_free
(
a
->
crl
,
X509_CRL_free
);
sk_pop_free
(
a
->
signer_info
,
PKCS7_SIGNER_INFO_free
);
Free
((
char
*
)
a
);
}
IMPLEMENT_STACK_OF
(
X509_ALGOR
)
IMPLEMENT_ASN1_SET_OF
(
X509_ALGOR
)
IMPLEMENT_STACK_OF
(
X509_CRL
)
IMPLEMENT_ASN1_SET_OF
(
X509_CRL
)
crypto/pkcs7/pk7_lib.c
浏览文件 @
6d114240
...
...
@@ -262,7 +262,7 @@ int PKCS7_add_certificate(PKCS7 *p7, X509 *x509)
int
PKCS7_add_crl
(
PKCS7
*
p7
,
X509_CRL
*
crl
)
{
int
i
;
STACK
**
sk
;
STACK
_OF
(
X509_CRL
)
**
sk
;
i
=
OBJ_obj2nid
(
p7
->
type
);
switch
(
i
)
...
...
@@ -279,10 +279,10 @@ int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl)
}
if
(
*
sk
==
NULL
)
*
sk
=
sk_new_null
();
*
sk
=
sk_
X509_CRL_
new_null
();
CRYPTO_add
(
&
crl
->
references
,
1
,
CRYPTO_LOCK_X509_CRL
);
sk_
push
(
*
sk
,(
char
*
)
crl
);
sk_
X509_CRL_push
(
*
sk
,
crl
);
return
(
1
);
}
...
...
crypto/pkcs7/pkcs7.h
浏览文件 @
6d114240
...
...
@@ -112,7 +112,7 @@ typedef struct pkcs7_signed_st
ASN1_INTEGER
*
version
;
/* version 1 */
STACK_OF
(
X509_ALGOR
)
*
md_algs
;
/* md used */
STACK_OF
(
X509
)
*
cert
;
/* [ 0 ] */
STACK
/* X509_CRL */
*
crl
;
/* [ 1 ] */
STACK
_OF
(
X509_CRL
)
*
crl
;
/* [ 1 ] */
STACK
/* PKCS7_SIGNER_INFO */
*
signer_info
;
struct
pkcs7_st
*
contents
;
...
...
@@ -140,7 +140,7 @@ typedef struct pkcs7_signedandenveloped_st
ASN1_INTEGER
*
version
;
/* version 1 */
STACK_OF
(
X509_ALGOR
)
*
md_algs
;
/* md used */
STACK_OF
(
X509
)
*
cert
;
/* [ 0 ] */
STACK
/* X509_CRL */
*
crl
;
/* [ 1 ] */
STACK
_OF
(
X509_CRL
)
*
crl
;
/* [ 1 ] */
STACK
/* PKCS7_SIGNER_INFO */
*
signer_info
;
PKCS7_ENC_CONTENT
*
enc_data
;
...
...
crypto/x509/x509.h
浏览文件 @
6d114240
...
...
@@ -275,6 +275,9 @@ typedef struct X509_crl_st
int
references
;
}
X509_CRL
;
DECLARE_STACK_OF
(
X509_CRL
)
DECLARE_ASN1_SET_OF
(
X509_CRL
)
typedef
struct
private_key_st
{
int
version
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录