Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
2e86f0d8
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,发现更多精彩内容 >>
提交
2e86f0d8
编写于
3月 31, 2008
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use correct headers for signed receipts. Use consistent naming.
Update cms-test.pl to support OpenSSL 0.9.8.
上级
e2a29d49
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
10 deletion
+25
-10
crypto/asn1/asn1.h
crypto/asn1/asn1.h
+3
-3
crypto/asn1/asn_mime.c
crypto/asn1/asn_mime.c
+5
-3
crypto/cms/cms_io.c
crypto/cms/cms_io.c
+3
-2
crypto/pkcs7/pk7_mime.c
crypto/pkcs7/pk7_mime.c
+2
-2
test/cms-test.pl
test/cms-test.pl
+12
-0
未找到文件。
crypto/asn1/asn1.h
浏览文件 @
2e86f0d8
...
...
@@ -324,7 +324,7 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
#define DECLARE_ASN1_FUNCTIONS_const(name) \
name *name##_new(void); \
void name##_free(name *a);
void name##_free(name *a);
\
#define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
type *name##_new(void); \
...
...
@@ -1126,10 +1126,10 @@ int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
const
char
*
hdr
,
const
ASN1_ITEM
*
it
);
int
SMIME_write_ASN1
(
BIO
*
bio
,
ASN1_VALUE
*
val
,
BIO
*
data
,
int
flags
,
int
ctype_nid
,
int
ctype_nid
,
int
econt_nid
,
STACK_OF
(
X509_ALGOR
)
*
mdalgs
,
const
ASN1_ITEM
*
it
);
ASN1_VALUE
*
SMIME_read_
asn
1
(
BIO
*
bio
,
BIO
**
bcont
,
const
ASN1_ITEM
*
it
);
ASN1_VALUE
*
SMIME_read_
ASN
1
(
BIO
*
bio
,
BIO
**
bcont
,
const
ASN1_ITEM
*
it
);
int
SMIME_crlf_copy
(
BIO
*
in
,
BIO
*
out
,
int
flags
);
int
SMIME_text
(
BIO
*
in
,
BIO
*
out
);
...
...
crypto/asn1/asn_mime.c
浏览文件 @
2e86f0d8
...
...
@@ -276,7 +276,7 @@ static int asn1_write_micalg(BIO *out, STACK_OF(X509_ALGOR) *mdalgs)
/* SMIME sender */
int
SMIME_write_ASN1
(
BIO
*
bio
,
ASN1_VALUE
*
val
,
BIO
*
data
,
int
flags
,
int
ctype_nid
,
int
ctype_nid
,
int
econt_nid
,
STACK_OF
(
X509_ALGOR
)
*
mdalgs
,
const
ASN1_ITEM
*
it
)
{
...
...
@@ -340,7 +340,9 @@ int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
msg_type
=
"enveloped-data"
;
else
if
(
ctype_nid
==
NID_pkcs7_signed
)
{
if
(
sk_X509_ALGOR_num
(
mdalgs
)
>=
0
)
if
(
econt_nid
==
NID_id_smime_ct_receipt
)
msg_type
=
"signed-receipt"
;
else
if
(
sk_X509_ALGOR_num
(
mdalgs
)
>=
0
)
msg_type
=
"signed-data"
;
else
msg_type
=
"certs-only"
;
...
...
@@ -423,7 +425,7 @@ static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
* pointed to by "bcont". In opaque this is set to NULL
*/
ASN1_VALUE
*
SMIME_read_
asn
1
(
BIO
*
bio
,
BIO
**
bcont
,
const
ASN1_ITEM
*
it
)
ASN1_VALUE
*
SMIME_read_
ASN
1
(
BIO
*
bio
,
BIO
**
bcont
,
const
ASN1_ITEM
*
it
)
{
BIO
*
asnin
;
STACK_OF
(
MIME_HEADER
)
*
headers
=
NULL
;
...
...
crypto/cms/cms_io.c
浏览文件 @
2e86f0d8
...
...
@@ -114,19 +114,20 @@ int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags)
{
STACK_OF
(
X509_ALGOR
)
*
mdalgs
;
int
ctype_nid
=
OBJ_obj2nid
(
cms
->
contentType
);
int
econt_nid
=
OBJ_obj2nid
(
CMS_get0_eContentType
(
cms
));
if
(
ctype_nid
==
NID_pkcs7_signed
)
mdalgs
=
cms
->
d
.
signedData
->
digestAlgorithms
;
else
mdalgs
=
NULL
;
return
SMIME_write_ASN1
(
bio
,
(
ASN1_VALUE
*
)
cms
,
data
,
flags
,
ctype_nid
,
mdalgs
,
ctype_nid
,
econt_nid
,
mdalgs
,
ASN1_ITEM_rptr
(
CMS_ContentInfo
));
}
CMS_ContentInfo
*
SMIME_read_CMS
(
BIO
*
bio
,
BIO
**
bcont
)
{
return
(
CMS_ContentInfo
*
)
SMIME_read_
asn
1
(
bio
,
bcont
,
return
(
CMS_ContentInfo
*
)
SMIME_read_
ASN
1
(
bio
,
bcont
,
ASN1_ITEM_rptr
(
CMS_ContentInfo
));
}
crypto/pkcs7/pk7_mime.c
浏览文件 @
2e86f0d8
...
...
@@ -87,11 +87,11 @@ int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
return
SMIME_write_ASN1
(
bio
,
(
ASN1_VALUE
*
)
p7
,
data
,
flags
,
ctype_nid
,
mdalgs
,
ctype_nid
,
NID_undef
,
mdalgs
,
ASN1_ITEM_rptr
(
PKCS7
));
}
PKCS7
*
SMIME_read_PKCS7
(
BIO
*
bio
,
BIO
**
bcont
)
{
return
(
PKCS7
*
)
SMIME_read_
asn
1
(
bio
,
bcont
,
ASN1_ITEM_rptr
(
PKCS7
));
return
(
PKCS7
*
)
SMIME_read_
ASN
1
(
bio
,
bcont
,
ASN1_ITEM_rptr
(
PKCS7
));
}
test/cms-test.pl
浏览文件 @
2e86f0d8
...
...
@@ -74,6 +74,7 @@ my $smdir = "smime-certs";
my
$halt_err
=
1
;
my
$badcmd
=
0
;
my
$ossl8
=
`
$ossl_path
version -v
`
=~
/0\.9\.8/
;
my
@smime_pkcs7_tests
=
(
...
...
@@ -333,6 +334,8 @@ else {
print
"
Zlib not supported: compression tests skipped
\n
";
}
print
"
Running modified tests for OpenSSL 0.9.8 cms backport
\n
"
if
(
$ossl8
);
if
(
$badcmd
)
{
print
"
$badcmd
TESTS FAILED!!
\n
";
}
...
...
@@ -351,6 +354,15 @@ sub run_smime_tests {
foreach
$smtst
(
@$aref
)
{
my
(
$tnam
,
$rscmd
,
$rvcmd
)
=
@$smtst
;
if
(
$ossl8
)
{
# Skip smime resign: 0.9.8 smime doesn't support -resign
next
if
(
$scmd
=~
/smime/
&&
$rscmd
=~
/-resign/
);
# Disable streaming: option not supported in 0.9.8
$tnam
=~
s/streaming//
;
$rscmd
=~
s/-stream//
;
$rvcmd
=~
s/-stream//
;
}
system
("
$scmd$rscmd
2>cms.err 1>cms.out
");
if
(
$?
)
{
print
"
$tnam
: generation error
\n
";
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录