Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
6308af19
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看板
提交
6308af19
编写于
1月 14, 2001
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change PKCS#12 key derivation routines to cope with
non null terminated passwords.
上级
8e5b6314
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
9 deletion
+19
-9
CHANGES
CHANGES
+6
-0
crypto/pkcs12/p12_attr.c
crypto/pkcs12/p12_attr.c
+1
-1
crypto/pkcs12/p12_key.c
crypto/pkcs12/p12_key.c
+1
-1
crypto/pkcs12/p12_utl.c
crypto/pkcs12/p12_utl.c
+10
-6
crypto/pkcs12/pkcs12.h
crypto/pkcs12/pkcs12.h
+1
-1
未找到文件。
CHANGES
浏览文件 @
6308af19
...
...
@@ -3,6 +3,12 @@
Changes between 0.9.6 and 0.9.7 [xx XXX 2000]
*) Change PKCS12_key_gen_asc() so it can cope with non null
terminated strings whose length is passed in the passlen
parameter, for example from PEM callbacks. This was done
by adding an extra length parameter to asc2uni().
[Steve Henson, reported by <oddissey@samsung.co.kr>]
*) New OCSP utility. Allows OCSP requests to be generated or
read. The request can be sent to a responder and the output
parsed, outputed or printed in text form. Not complete yet:
...
...
crypto/pkcs12/p12_attr.c
浏览文件 @
6308af19
...
...
@@ -151,7 +151,7 @@ int PKCS12_add_friendlyname_asc (PKCS12_SAFEBAG *bag, const char *name,
{
unsigned
char
*
uniname
;
int
ret
,
unilen
;
if
(
!
asc2uni
(
name
,
&
uniname
,
&
unilen
))
{
if
(
!
asc2uni
(
name
,
namelen
,
&
uniname
,
&
unilen
))
{
PKCS12err
(
PKCS12_F_PKCS12_ADD_FRIENDLYNAME_ASC
,
ERR_R_MALLOC_FAILURE
);
return
0
;
...
...
crypto/pkcs12/p12_key.c
浏览文件 @
6308af19
...
...
@@ -84,7 +84,7 @@ int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt,
if
(
!
pass
)
{
unipass
=
NULL
;
uniplen
=
0
;
}
else
if
(
!
asc2uni
(
pass
,
&
unipass
,
&
uniplen
))
{
}
else
if
(
!
asc2uni
(
pass
,
passlen
,
&
unipass
,
&
uniplen
))
{
PKCS12err
(
PKCS12_F_PKCS12_KEY_GEN_ASC
,
ERR_R_MALLOC_FAILURE
);
return
0
;
}
...
...
crypto/pkcs12/p12_utl.c
浏览文件 @
6308af19
...
...
@@ -62,22 +62,26 @@
/* Cheap and nasty Unicode stuff */
unsigned
char
*
asc2uni
(
const
char
*
asc
,
unsigned
char
**
uni
,
int
*
unilen
)
unsigned
char
*
asc2uni
(
const
char
*
asc
,
int
asclen
,
unsigned
char
**
uni
,
int
*
unilen
)
{
int
ulen
,
i
;
unsigned
char
*
unitmp
;
ulen
=
strlen
(
asc
)
*
2
+
2
;
if
(
!
(
unitmp
=
OPENSSL_malloc
(
ulen
)))
return
NULL
;
for
(
i
=
0
;
i
<
ulen
;
i
+=
2
)
{
if
(
asclen
==
-
1
)
asclen
=
strlen
(
asc
);
ulen
=
asclen
*
2
+
2
;
if
(
!
(
unitmp
=
OPENSSL_malloc
(
ulen
)))
return
NULL
;
for
(
i
=
0
;
i
<
ulen
-
2
;
i
+=
2
)
{
unitmp
[
i
]
=
0
;
unitmp
[
i
+
1
]
=
asc
[
i
>>
1
];
}
/* Make result double null terminated */
unitmp
[
ulen
-
2
]
=
0
;
unitmp
[
ulen
-
1
]
=
0
;
if
(
unilen
)
*
unilen
=
ulen
;
if
(
uni
)
*
uni
=
unitmp
;
return
unitmp
;
}
char
*
uni2asc
(
unsigned
char
*
uni
,
int
unilen
)
char
*
uni2asc
(
unsigned
char
*
uni
,
int
unilen
)
{
int
asclen
,
i
;
char
*
asctmp
;
...
...
@@ -85,7 +89,7 @@ char *uni2asc (unsigned char *uni, int unilen)
/* If no terminating zero allow for one */
if
(
!
unilen
||
uni
[
unilen
-
1
])
asclen
++
;
uni
++
;
if
(
!
(
asctmp
=
OPENSSL_malloc
(
asclen
)))
return
NULL
;
if
(
!
(
asctmp
=
OPENSSL_malloc
(
asclen
)))
return
NULL
;
for
(
i
=
0
;
i
<
unilen
;
i
+=
2
)
asctmp
[
i
>>
1
]
=
uni
[
i
];
asctmp
[
asclen
-
1
]
=
0
;
return
asctmp
;
...
...
crypto/pkcs12/pkcs12.h
浏览文件 @
6308af19
...
...
@@ -230,7 +230,7 @@ int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen,
EVP_MD
*
md_type
);
int
PKCS12_setup_mac
(
PKCS12
*
p12
,
int
iter
,
unsigned
char
*
salt
,
int
saltlen
,
EVP_MD
*
md_type
);
unsigned
char
*
asc2uni
(
const
char
*
asc
,
unsigned
char
**
uni
,
int
*
unilen
);
unsigned
char
*
asc2uni
(
const
char
*
asc
,
int
asclen
,
unsigned
char
**
uni
,
int
*
unilen
);
char
*
uni2asc
(
unsigned
char
*
uni
,
int
unilen
);
DECLARE_ASN1_FUNCTIONS
(
PKCS12
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录