Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
e0fbd073
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看板
提交
e0fbd073
编写于
4月 10, 2008
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add additional parameter to CMS_final() to handle detached content.
上级
eaee098e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
11 deletion
+14
-11
apps/cms.c
apps/cms.c
+2
-2
crypto/cms/cms.h
crypto/cms/cms.h
+1
-1
crypto/cms/cms_smime.c
crypto/cms/cms_smime.c
+11
-8
未找到文件。
apps/cms.c
浏览文件 @
e0fbd073
...
...
@@ -891,7 +891,7 @@ int MAIN(int argc, char **argv)
}
if
(
!
(
flags
&
CMS_STREAM
))
{
if
(
!
CMS_final
(
cms
,
in
,
flags
))
if
(
!
CMS_final
(
cms
,
in
,
NULL
,
flags
))
goto
end
;
}
}
...
...
@@ -978,7 +978,7 @@ int MAIN(int argc, char **argv)
/* If not streaming or resigning finalize structure */
if
((
operation
==
SMIME_SIGN
)
&&
!
(
flags
&
CMS_STREAM
))
{
if
(
!
CMS_final
(
cms
,
in
,
flags
))
if
(
!
CMS_final
(
cms
,
in
,
NULL
,
flags
))
goto
end
;
}
}
...
...
crypto/cms/cms.h
浏览文件 @
e0fbd073
...
...
@@ -135,7 +135,7 @@ int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags)
CMS_ContentInfo
*
SMIME_read_CMS
(
BIO
*
bio
,
BIO
**
bcont
);
int
SMIME_write_CMS
(
BIO
*
bio
,
CMS_ContentInfo
*
cms
,
BIO
*
data
,
int
flags
);
int
CMS_final
(
CMS_ContentInfo
*
cms
,
BIO
*
data
,
int
flags
);
int
CMS_final
(
CMS_ContentInfo
*
cms
,
BIO
*
data
,
BIO
*
dcont
,
unsigned
int
flags
);
CMS_ContentInfo
*
CMS_sign
(
X509
*
signcert
,
EVP_PKEY
*
pkey
,
STACK_OF
(
X509
)
*
certs
,
BIO
*
data
,
unsigned
int
flags
);
...
...
crypto/cms/cms_smime.c
浏览文件 @
e0fbd073
...
...
@@ -149,7 +149,7 @@ CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags)
if
(
!
cms
)
return
NULL
;
if
((
flags
&
CMS_STREAM
)
||
CMS_final
(
cms
,
in
,
flags
))
if
((
flags
&
CMS_STREAM
)
||
CMS_final
(
cms
,
in
,
NULL
,
flags
))
return
cms
;
CMS_ContentInfo_free
(
cms
);
...
...
@@ -194,7 +194,7 @@ CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
if
(
!
(
flags
&
CMS_DETACHED
))
CMS_set_detached
(
cms
,
0
);
if
((
flags
&
CMS_STREAM
)
||
CMS_final
(
cms
,
in
,
flags
))
if
((
flags
&
CMS_STREAM
)
||
CMS_final
(
cms
,
in
,
NULL
,
flags
))
return
cms
;
CMS_ContentInfo_free
(
cms
);
...
...
@@ -246,7 +246,8 @@ CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
if
(
!
(
flags
&
CMS_DETACHED
))
CMS_set_detached
(
cms
,
0
);
if
((
flags
&
(
CMS_STREAM
|
CMS_PARTIAL
))
||
CMS_final
(
cms
,
in
,
flags
))
if
((
flags
&
(
CMS_STREAM
|
CMS_PARTIAL
))
||
CMS_final
(
cms
,
in
,
NULL
,
flags
))
return
cms
;
CMS_ContentInfo_free
(
cms
);
...
...
@@ -459,7 +460,8 @@ CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
if
(
!
(
flags
&
CMS_DETACHED
))
CMS_set_detached
(
cms
,
0
);
if
((
flags
&
(
CMS_STREAM
|
CMS_PARTIAL
))
||
CMS_final
(
cms
,
data
,
flags
))
if
((
flags
&
(
CMS_STREAM
|
CMS_PARTIAL
))
||
CMS_final
(
cms
,
data
,
NULL
,
flags
))
return
cms
;
else
goto
err
;
...
...
@@ -526,7 +528,7 @@ CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
goto
err
;
/* Finalize structure */
if
(
!
CMS_final
(
cms
,
rct_cont
,
flags
))
if
(
!
CMS_final
(
cms
,
rct_cont
,
NULL
,
flags
))
goto
err
;
/* Set embedded content */
...
...
@@ -567,7 +569,8 @@ CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *data,
if
(
!
(
flags
&
CMS_DETACHED
))
CMS_set_detached
(
cms
,
0
);
if
((
flags
&
(
CMS_STREAM
|
CMS_PARTIAL
))
||
CMS_final
(
cms
,
data
,
flags
))
if
((
flags
&
(
CMS_STREAM
|
CMS_PARTIAL
))
||
CMS_final
(
cms
,
data
,
NULL
,
flags
))
return
cms
;
else
goto
err
;
...
...
@@ -679,11 +682,11 @@ int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert,
return
r
;
}
int
CMS_final
(
CMS_ContentInfo
*
cms
,
BIO
*
data
,
int
flags
)
int
CMS_final
(
CMS_ContentInfo
*
cms
,
BIO
*
data
,
BIO
*
dcont
,
unsigned
int
flags
)
{
BIO
*
cmsbio
;
int
ret
=
0
;
if
(
!
(
cmsbio
=
CMS_dataInit
(
cms
,
NULL
)))
if
(
!
(
cmsbio
=
CMS_dataInit
(
cms
,
dcont
)))
{
CMSerr
(
CMS_F_CMS_FINAL
,
ERR_R_MALLOC_FAILURE
);
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录