Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
b216664f
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看板
提交
b216664f
编写于
12月 11, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Various S/MIME fixes.
上级
d8223efd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
35 deletion
+50
-35
CHANGES
CHANGES
+6
-0
crypto/objects/obj_dat.h
crypto/objects/obj_dat.h
+30
-30
crypto/objects/objects.h
crypto/objects/objects.h
+1
-1
crypto/pkcs7/pk7_lib.c
crypto/pkcs7/pk7_lib.c
+6
-1
crypto/pkcs7/pk7_smime.c
crypto/pkcs7/pk7_smime.c
+7
-3
未找到文件。
CHANGES
浏览文件 @
b216664f
...
...
@@ -4,6 +4,12 @@
Changes between 0.9.4 and 0.9.5 [xx XXX 1999]
*) Some S/MIME fixes. The OID for SMIMECapabilities was wrong, the
ordering of SMIMECapabilities wasn't in "strength order" and there
was a missing NULL in the AlgorithmIdentifier for the SHA1 signature
algorithm.
[Steve Henson]
*) Some ASN1 types with illegal zero length encoding (INTEGER,
ENUMERATED and OBJECT IDENTIFIER) choked the ASN1 routines.
[Frans Heymans <fheymans@isaserver.be>, modified by Steve Henson]
...
...
crypto/objects/obj_dat.h
浏览文件 @
b216664f
...
...
@@ -66,7 +66,7 @@
#define NUM_LN 175
#define NUM_OBJ 152
static
unsigned
char
lvalues
[
10
57
]
=
{
static
unsigned
char
lvalues
[
10
65
]
=
{
0x00
,
/* [ 0] OBJ_undef */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
/* [ 1] OBJ_rsadsi */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
/* [ 7] OBJ_pkcs */
...
...
@@ -205,20 +205,20 @@ static unsigned char lvalues[1057]={
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x02
,
0x07
,
/* [933] OBJ_hmacWithSHA1 */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x02
,
0x01
,
/* [941] OBJ_id_qt_cps */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x02
,
0x02
,
/* [949] OBJ_id_qt_unotice */
0x
0F
,
/* [957] OBJ_SMIMECapabilities */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x05
,
0x04
,
/* [9
58
] OBJ_pbeWithMD2AndRC2_CBC */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x05
,
0x06
,
/* [9
67
] OBJ_pbeWithMD5AndRC2_CBC */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x05
,
0x0A
,
/* [9
76
] OBJ_pbeWithSHA1AndDES_CBC */
0x2B
,
0x06
,
0x01
,
0x04
,
0x01
,
0x82
,
0x37
,
0x02
,
0x01
,
0x0E
,
/* [9
85
] OBJ_ms_ext_req */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x09
,
0x0E
,
/* [
995
] OBJ_ext_req */
0x55
,
0x04
,
0x29
,
/* [10
04
] OBJ_name */
0x55
,
0x04
,
0x2E
,
/* [10
07
] OBJ_dnQualifier */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x01
,
/* [101
0
] OBJ_id_pe */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x30
,
/* [10
17
] OBJ_id_ad */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x01
,
0x01
,
/* [10
24
] OBJ_info_access */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x30
,
0x01
,
/* [10
32
] OBJ_ad_OCSP */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x30
,
0x02
,
/* [104
0
] OBJ_ad_ca_issuers */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x03
,
0x09
,
/* [10
48
] OBJ_OCSP_sign */
0x
2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x09
,
0x0F
,
/* [957] OBJ_SMIMECapabilities */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x05
,
0x04
,
/* [9
66
] OBJ_pbeWithMD2AndRC2_CBC */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x05
,
0x06
,
/* [9
75
] OBJ_pbeWithMD5AndRC2_CBC */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x05
,
0x0A
,
/* [9
84
] OBJ_pbeWithSHA1AndDES_CBC */
0x2B
,
0x06
,
0x01
,
0x04
,
0x01
,
0x82
,
0x37
,
0x02
,
0x01
,
0x0E
,
/* [9
93
] OBJ_ms_ext_req */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x09
,
0x0E
,
/* [
1003
] OBJ_ext_req */
0x55
,
0x04
,
0x29
,
/* [10
12
] OBJ_name */
0x55
,
0x04
,
0x2E
,
/* [10
15
] OBJ_dnQualifier */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x01
,
/* [101
8
] OBJ_id_pe */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x30
,
/* [10
25
] OBJ_id_ad */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x01
,
0x01
,
/* [10
32
] OBJ_info_access */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x30
,
0x01
,
/* [10
40
] OBJ_ad_OCSP */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x30
,
0x02
,
/* [104
8
] OBJ_ad_ca_issuers */
0x2B
,
0x06
,
0x01
,
0x05
,
0x05
,
0x07
,
0x03
,
0x09
,
/* [10
56
] OBJ_OCSP_sign */
};
static
ASN1_OBJECT
nid_objs
[
NUM_NID
]
=
{
...
...
@@ -453,26 +453,26 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
{
"id-qt-unotice"
,
"Policy Qualifier User Notice"
,
NID_id_qt_unotice
,
8
,
&
(
lvalues
[
949
]),
0
},
{
"RC2-64-CBC"
,
"rc2-64-cbc"
,
NID_rc2_64_cbc
,
0
,
NULL
},
{
"SMIME-CAPS"
,
"S/MIME Capabilities"
,
NID_SMIMECapabilities
,
1
,
{
"SMIME-CAPS"
,
"S/MIME Capabilities"
,
NID_SMIMECapabilities
,
9
,
&
(
lvalues
[
957
]),
0
},
{
"pbeWithMD2AndRC2-CBC"
,
"pbeWithMD2AndRC2-CBC"
,
NID_pbeWithMD2AndRC2_CBC
,
9
,
&
(
lvalues
[
9
58
]),
0
},
NID_pbeWithMD2AndRC2_CBC
,
9
,
&
(
lvalues
[
9
66
]),
0
},
{
"pbeWithMD5AndRC2-CBC"
,
"pbeWithMD5AndRC2-CBC"
,
NID_pbeWithMD5AndRC2_CBC
,
9
,
&
(
lvalues
[
9
67
]),
0
},
NID_pbeWithMD5AndRC2_CBC
,
9
,
&
(
lvalues
[
9
75
]),
0
},
{
"pbeWithSHA1AndDES-CBC"
,
"pbeWithSHA1AndDES-CBC"
,
NID_pbeWithSHA1AndDES_CBC
,
9
,
&
(
lvalues
[
9
76
]),
0
},
NID_pbeWithSHA1AndDES_CBC
,
9
,
&
(
lvalues
[
9
84
]),
0
},
{
"msExtReq"
,
"Microsoft Extension Request"
,
NID_ms_ext_req
,
10
,
&
(
lvalues
[
9
85
]),
0
},
{
"extReq"
,
"Extension Request"
,
NID_ext_req
,
9
,
&
(
lvalues
[
995
]),
0
},
{
"name"
,
"name"
,
NID_name
,
3
,
&
(
lvalues
[
10
04
]),
0
},
{
"dnQualifier"
,
"dnQualifier"
,
NID_dnQualifier
,
3
,
&
(
lvalues
[
10
07
]),
0
},
{
"id-pe"
,
"id-pe"
,
NID_id_pe
,
7
,
&
(
lvalues
[
101
0
]),
0
},
{
"id-ad"
,
"id-ad"
,
NID_id_ad
,
7
,
&
(
lvalues
[
10
17
]),
0
},
&
(
lvalues
[
9
93
]),
0
},
{
"extReq"
,
"Extension Request"
,
NID_ext_req
,
9
,
&
(
lvalues
[
1003
]),
0
},
{
"name"
,
"name"
,
NID_name
,
3
,
&
(
lvalues
[
10
12
]),
0
},
{
"dnQualifier"
,
"dnQualifier"
,
NID_dnQualifier
,
3
,
&
(
lvalues
[
10
15
]),
0
},
{
"id-pe"
,
"id-pe"
,
NID_id_pe
,
7
,
&
(
lvalues
[
101
8
]),
0
},
{
"id-ad"
,
"id-ad"
,
NID_id_ad
,
7
,
&
(
lvalues
[
10
25
]),
0
},
{
"authorityInfoAccess"
,
"Authority Information Access"
,
NID_info_access
,
8
,
&
(
lvalues
[
10
24
]),
0
},
{
"OCSP"
,
"OCSP"
,
NID_ad_OCSP
,
8
,
&
(
lvalues
[
10
32
]),
0
},
{
"caIssuers"
,
"CA Issuers"
,
NID_ad_ca_issuers
,
8
,
&
(
lvalues
[
104
0
]),
0
},
{
"OCSP Signing"
,
"OCSP Signing"
,
NID_OCSP_sign
,
8
,
&
(
lvalues
[
10
48
]),
0
},
8
,
&
(
lvalues
[
10
32
]),
0
},
{
"OCSP"
,
"OCSP"
,
NID_ad_OCSP
,
8
,
&
(
lvalues
[
10
40
]),
0
},
{
"caIssuers"
,
"CA Issuers"
,
NID_ad_ca_issuers
,
8
,
&
(
lvalues
[
104
8
]),
0
},
{
"OCSP Signing"
,
"OCSP Signing"
,
NID_OCSP_sign
,
8
,
&
(
lvalues
[
10
56
]),
0
},
};
static
ASN1_OBJECT
*
sn_objs
[
NUM_SN
]
=
{
...
...
@@ -786,7 +786,6 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
static
ASN1_OBJECT
*
obj_objs
[
NUM_OBJ
]
=
{
&
(
nid_objs
[
0
]),
/* OBJ_undef 0 */
&
(
nid_objs
[
167
]),
/* OBJ_SMIMECapabilities 15 */
&
(
nid_objs
[
11
]),
/* OBJ_X500 2 5 */
&
(
nid_objs
[
12
]),
/* OBJ_X509 2 5 4 */
&
(
nid_objs
[
81
]),
/* OBJ_ld_ce 2 5 29 */
...
...
@@ -904,6 +903,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
&
(
nid_objs
[
55
]),
/* OBJ_pkcs9_unstructuredAddress 1 2 840 113549 1 9 8 */
&
(
nid_objs
[
56
]),
/* OBJ_pkcs9_extCertAttributes 1 2 840 113549 1 9 9 */
&
(
nid_objs
[
172
]),
/* OBJ_ext_req 1 2 840 113549 1 9 14 */
&
(
nid_objs
[
167
]),
/* OBJ_SMIMECapabilities 1 2 840 113549 1 9 15 */
&
(
nid_objs
[
156
]),
/* OBJ_friendlyName 1 2 840 113549 1 9 20 */
&
(
nid_objs
[
157
]),
/* OBJ_localKeyID 1 2 840 113549 1 9 21 */
&
(
nid_objs
[
71
]),
/* OBJ_netscape_cert_type 2 16 840 1 113730 1 1 */
...
...
crypto/objects/objects.h
浏览文件 @
b216664f
...
...
@@ -876,7 +876,7 @@ extern "C" {
#define SN_SMIMECapabilities "SMIME-CAPS"
#define LN_SMIMECapabilities "S/MIME Capabilities"
#define NID_SMIMECapabilities 167
#define OBJ_SMIMECapabilities OBJ_
id_
pkcs9,15L
#define OBJ_SMIMECapabilities OBJ_pkcs9,15L
#define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC"
#define NID_pbeWithMD2AndRC2_CBC 168
...
...
crypto/pkcs7/pk7_lib.c
浏览文件 @
b216664f
...
...
@@ -227,8 +227,13 @@ int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *psi)
}
if
(
!
j
)
/* we need to add another algorithm */
{
alg
=
X509_ALGOR_new
();
if
(
!
(
alg
=
X509_ALGOR_new
())
||
!
(
alg
->
parameter
=
ASN1_TYPE_new
()))
{
PKCS7err
(
PKCS7_F_PKCS7_ADD_SIGNER
,
ERR_R_MALLOC_FAILURE
);
return
(
0
);
}
alg
->
algorithm
=
OBJ_nid2obj
(
nid
);
alg
->
parameter
->
type
=
V_ASN1_NULL
;
sk_X509_ALGOR_push
(
md_sk
,
alg
);
}
...
...
crypto/pkcs7/pk7_smime.c
浏览文件 @
b216664f
...
...
@@ -115,12 +115,16 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
}
#ifndef NO_DES
PKCS7_simple_smimecap
(
smcap
,
NID_des_ede3_cbc
,
-
1
);
PKCS7_simple_smimecap
(
smcap
,
NID_des_cbc
,
-
1
);
#endif
#ifndef NO_RC2
PKCS7_simple_smimecap
(
smcap
,
NID_rc2_cbc
,
40
);
PKCS7_simple_smimecap
(
smcap
,
NID_rc2_cbc
,
128
);
PKCS7_simple_smimecap
(
smcap
,
NID_rc2_cbc
,
64
);
#endif
#ifndef NO_DES
PKCS7_simple_smimecap
(
smcap
,
NID_des_cbc
,
-
1
);
#endif
#ifndef NO_RC2
PKCS7_simple_smimecap
(
smcap
,
NID_rc2_cbc
,
40
);
#endif
PKCS7_add_attrib_smimecap
(
si
,
smcap
);
sk_pop_free
(
smcap
,
X509_ALGOR_free
);
...
...
@@ -152,7 +156,7 @@ int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
if
(
!
p7
)
{
PKCS7err
(
PKCS7_F_PKCS7_VERIFY
,
PKCS7_R_INVALID_NULL_POINTER
);
return
NULL
;
return
0
;
}
if
(
!
PKCS7_type_is_signed
(
p7
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录