Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c6c34506
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
8 个月 前同步成功
通知
8
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,体验更适合开发者的 AI 搜索 >>
提交
c6c34506
编写于
8月 17, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix PKCS7_ENC_CONTENT_new() to include a sensible default content type and add
support for encrypted content type in PKCS7_set_content().
上级
2cfa6921
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
23 addition
and
11 deletion
+23
-11
CHANGES
CHANGES
+8
-0
crypto/asn1/p7_enc_c.c
crypto/asn1/p7_enc_c.c
+2
-1
crypto/pkcs12/p12_add.c
crypto/pkcs12/p12_add.c
+3
-5
crypto/pkcs12/pk12err.c
crypto/pkcs12/pk12err.c
+1
-0
crypto/pkcs12/pkcs12.h
crypto/pkcs12/pkcs12.h
+1
-0
crypto/pkcs7/dec.c
crypto/pkcs7/dec.c
+1
-1
crypto/pkcs7/pk7_lib.c
crypto/pkcs7/pk7_lib.c
+7
-4
未找到文件。
CHANGES
浏览文件 @
c6c34506
...
...
@@ -4,6 +4,14 @@
Changes between 0.9.4 and 0.9.5 [xx XXX 1999]
*) The PKCS7_ENC_CONTENT_new() function was setting the content type as
NID_pkcs7_encrypted by default: this was wrong since this should almost
always be NID_pkcs7_data. Also modified the PKCS7_set_type() to handle
the encrypted data type: this is a more sensible place to put it and it
allows the PKCS#12 code to be tidied up that duplicated this
functionality.
[Steve Henson]
*) Changed obj_dat.pl script so it takes its input and output files on
the command line. This should avoid shell escape redirection problems
under Win32.
...
...
crypto/asn1/p7_enc_c.c
浏览文件 @
c6c34506
...
...
@@ -101,7 +101,8 @@ PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void)
M_ASN1_New_Malloc
(
ret
,
PKCS7_ENC_CONTENT
);
/* M_ASN1_New(ret->content_type,ASN1_OBJECT_new); */
ret
->
content_type
=
OBJ_nid2obj
(
NID_pkcs7_encrypted
);
/* We will almost always want this: so make it the default */
ret
->
content_type
=
OBJ_nid2obj
(
NID_pkcs7_data
);
M_ASN1_New
(
ret
->
algorithm
,
X509_ALGOR_new
);
ret
->
enc_data
=
NULL
;
return
(
ret
);
...
...
crypto/pkcs12/p12_add.c
浏览文件 @
c6c34506
...
...
@@ -157,13 +157,11 @@ PKCS7 *PKCS12_pack_p7encdata (int pbe_nid, const char *pass, int passlen,
PKCS12err
(
PKCS12_F_PKCS12_PACK_P7ENCDATA
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
p7
->
type
=
OBJ_nid2obj
(
NID_pkcs7_encrypted
);
if
(
!
(
p7
->
d
.
encrypted
=
PKCS7_ENCRYPT_new
()))
{
PKCS12err
(
PKCS12_F_PKCS12_PACK_P7ENCDATA
,
ERR_R_MALLOC_FAILUR
E
);
if
(
!
PKCS7_set_type
(
p7
,
NID_pkcs7_encrypted
))
{
PKCS12err
(
PKCS12_F_PKCS12_PACK_P7ENCDATA
,
PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYP
E
);
return
NULL
;
}
ASN1_INTEGER_set
(
p7
->
d
.
encrypted
->
version
,
0
);
p7
->
d
.
encrypted
->
enc_data
->
content_type
=
OBJ_nid2obj
(
NID_pkcs7_data
);
if
(
!
(
pbe
=
PKCS5_pbe_set
(
pbe_nid
,
iter
,
salt
,
saltlen
)))
{
PKCS12err
(
PKCS12_F_PKCS12_PACK_P7ENCDATA
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
...
...
crypto/pkcs12/pk12err.c
浏览文件 @
c6c34506
...
...
@@ -99,6 +99,7 @@ static ERR_STRING_DATA PKCS12_str_reasons[]=
{
PKCS12_R_DECODE_ERROR
,
"decode error"
},
{
PKCS12_R_ENCODE_ERROR
,
"encode error"
},
{
PKCS12_R_ENCRYPT_ERROR
,
"encrypt error"
},
{
PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE
,
"error setting encrypted data type"
},
{
PKCS12_R_INVALID_NULL_ARGUMENT
,
"invalid null argument"
},
{
PKCS12_R_INVALID_NULL_PKCS12_POINTER
,
"invalid null pkcs12 pointer"
},
{
PKCS12_R_IV_GEN_ERROR
,
"iv gen error"
},
...
...
crypto/pkcs12/pkcs12.h
浏览文件 @
c6c34506
...
...
@@ -313,6 +313,7 @@ PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);
#define PKCS12_R_DECODE_ERROR 101
#define PKCS12_R_ENCODE_ERROR 102
#define PKCS12_R_ENCRYPT_ERROR 103
#define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120
#define PKCS12_R_INVALID_NULL_ARGUMENT 104
#define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105
#define PKCS12_R_IV_GEN_ERROR 106
...
...
crypto/pkcs7/dec.c
浏览文件 @
c6c34506
...
...
@@ -149,7 +149,7 @@ char *argv[];
/* We need to process the data */
/* We cannot support detached encryption */
p7bio
=
PKCS7_dataDecode
(
p7
,
pkey
,
detached
,
x509
);
if
(
p7bio
==
NULL
)
{
printf
(
"problems decoding
\n
"
);
...
...
crypto/pkcs7/pk7_lib.c
浏览文件 @
c6c34506
...
...
@@ -165,9 +165,6 @@ int PKCS7_set_type(PKCS7 *p7, int type)
if
((
p7
->
d
.
signed_and_enveloped
=
PKCS7_SIGN_ENVELOPE_new
())
==
NULL
)
goto
err
;
ASN1_INTEGER_set
(
p7
->
d
.
signed_and_enveloped
->
version
,
1
);
/* p7->d.signed_and_enveloped->enc_data->content_type=
OBJ_nid2obj(NID_pkcs7_encrypted);*/
break
;
case
NID_pkcs7_enveloped
:
p7
->
type
=
obj
;
...
...
@@ -175,8 +172,14 @@ int PKCS7_set_type(PKCS7 *p7, int type)
==
NULL
)
goto
err
;
ASN1_INTEGER_set
(
p7
->
d
.
enveloped
->
version
,
0
);
break
;
case
NID_pkcs7_digest
:
case
NID_pkcs7_encrypted
:
p7
->
type
=
obj
;
if
((
p7
->
d
.
encrypted
=
PKCS7_ENCRYPT_new
())
==
NULL
)
goto
err
;
ASN1_INTEGER_set
(
p7
->
d
.
encrypted
->
version
,
0
);
break
;
case
NID_pkcs7_digest
:
default:
PKCS7err
(
PKCS7_F_PKCS7_SET_TYPE
,
PKCS7_R_UNSUPPORTED_CONTENT_TYPE
);
goto
err
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录