Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
922180d7
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看板
提交
922180d7
编写于
25年前
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow the PKCS#7 (S/MIME encrypt) application to support more than one
recipient.
上级
12ea4470
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
6 deletion
+19
-6
CHANGES
CHANGES
+4
-0
crypto/pkcs7/enc.c
crypto/pkcs7/enc.c
+15
-6
未找到文件。
CHANGES
浏览文件 @
922180d7
...
...
@@ -4,6 +4,10 @@
Changes between 0.9.3a and 0.9.4 [xx Jul/Aug/...? 1999]
*) Allow the -k option to be used more than once in the enc program:
this allows the same encrypted message to be read by multiple recipients.
[Steve Henson]
*) New function OBJ_obj2txt(buf, buf_len, a, no_name), this converts
an ASN1_OBJECT to a text string. If the "no_name" parameter is set then
it will always use the numerical form of the OID, even if it has a short
...
...
This diff is collapsed.
Click to expand it.
crypto/pkcs7/enc.c
浏览文件 @
922180d7
...
...
@@ -74,6 +74,7 @@ char *argv[];
int
nodetach
=
1
;
char
*
keyfile
=
NULL
;
const
EVP_CIPHER
*
cipher
=
NULL
;
STACK_OF
(
X509
)
*
recips
=
NULL
;
SSLeay_add_all_algorithms
();
...
...
@@ -96,13 +97,20 @@ char *argv[];
keyfile
=
argv
[
2
];
argc
-=
2
;
argv
+=
2
;
if
(
!
(
in
=
BIO_new_file
(
keyfile
,
"r"
)))
goto
err
;
if
(
!
(
x509
=
PEM_read_bio_X509
(
in
,
NULL
,
NULL
)))
goto
err
;
if
(
!
recips
)
recips
=
sk_X509_new_null
();
sk_X509_push
(
recips
,
x509
);
BIO_free
(
in
);
}
else
break
;
}
if
(
!
BIO_read_filename
(
data
,
argv
[
1
]))
goto
err
;
if
(
!
recips
)
{
fprintf
(
stderr
,
"No recipients
\n
"
);
goto
err
;
}
if
((
in
=
BIO_new_file
(
keyfile
,
"r"
))
==
NULL
)
goto
err
;
if
((
x509
=
PEM_read_bio_X509
(
in
,
NULL
,
NULL
))
==
NULL
)
goto
err
;
if
(
!
BIO_read_filename
(
data
,
argv
[
1
]))
goto
err
;
p7
=
PKCS7_new
();
#if 0
...
...
@@ -120,9 +128,10 @@ char *argv[];
if
(
!
cipher
)
cipher
=
EVP_des_ede3_cbc
();
if
(
!
PKCS7_set_cipher
(
p7
,
cipher
))
goto
err
;
if
(
PKCS7_add_recipient
(
p7
,
x509
)
==
NULL
)
goto
err
;
for
(
i
=
0
;
i
<
sk_X509_num
(
recips
);
i
++
)
{
if
(
!
PKCS7_add_recipient
(
p7
,
sk_X509_value
(
recips
,
i
)))
goto
err
;
}
sk_X509_pop_free
(
recips
,
X509_free
);
/* Set the content of the signed to 'data' */
/* PKCS7_content_new(p7,NID_pkcs7_data); not used in envelope */
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部