Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
a229e303
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
9 个月 前同步成功
通知
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 搜索 >>
提交
a229e303
编写于
1月 27, 2005
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Get rid if the annoying warning
上级
4aca9297
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
10 deletion
+18
-10
crypto/asn1/a_type.c
crypto/asn1/a_type.c
+4
-1
crypto/asn1/x_name.c
crypto/asn1/x_name.c
+11
-8
crypto/pem/pem_lib.c
crypto/pem/pem_lib.c
+3
-1
未找到文件。
crypto/asn1/a_type.c
浏览文件 @
a229e303
...
...
@@ -71,7 +71,10 @@ int ASN1_TYPE_get(ASN1_TYPE *a)
void
ASN1_TYPE_set
(
ASN1_TYPE
*
a
,
int
type
,
void
*
value
)
{
if
(
a
->
value
.
ptr
!=
NULL
)
ASN1_primitive_free
((
ASN1_VALUE
**
)
&
a
,
NULL
);
{
ASN1_TYPE
**
tmp_a
=
&
a
;
ASN1_primitive_free
((
ASN1_VALUE
**
)
tmp_a
,
NULL
);
}
a
->
type
=
type
;
a
->
value
.
ptr
=
value
;
}
...
...
crypto/asn1/x_name.c
浏览文件 @
a229e303
...
...
@@ -160,21 +160,22 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len
int
tag
,
int
aclass
,
char
opt
,
ASN1_TLC
*
ctx
)
{
const
unsigned
char
*
p
=
*
in
,
*
q
;
STACK
*
intname
=
NULL
;
STACK
*
intname
=
NULL
,
**
intname_pp
=
&
intname
;
int
i
,
j
,
ret
;
X509_NAME
*
nm
=
NULL
;
X509_NAME
*
nm
=
NULL
,
**
nm_pp
=
&
nm
;
STACK_OF
(
X509_NAME_ENTRY
)
*
entries
;
X509_NAME_ENTRY
*
entry
;
q
=
p
;
/* Get internal representation of Name */
ret
=
ASN1_item_ex_d2i
((
ASN1_VALUE
**
)
&
intname
,
&
p
,
len
,
ASN1_ITEM_rptr
(
X509_NAME_INTERNAL
),
tag
,
aclass
,
opt
,
ctx
);
ret
=
ASN1_item_ex_d2i
((
ASN1_VALUE
**
)
intname_pp
,
&
p
,
len
,
ASN1_ITEM_rptr
(
X509_NAME_INTERNAL
),
tag
,
aclass
,
opt
,
ctx
);
if
(
ret
<=
0
)
return
ret
;
if
(
*
val
)
x509_name_ex_free
(
val
,
NULL
);
if
(
!
x509_name_ex_new
((
ASN1_VALUE
**
)
&
nm
,
NULL
))
goto
err
;
if
(
!
x509_name_ex_new
((
ASN1_VALUE
**
)
nm_pp
,
NULL
))
goto
err
;
/* We've decoded it: now cache encoding */
if
(
!
BUF_MEM_grow
(
nm
->
bytes
,
p
-
q
))
goto
err
;
memcpy
(
nm
->
bytes
->
data
,
q
,
p
-
q
);
...
...
@@ -218,7 +219,7 @@ static int x509_name_ex_i2d(ASN1_VALUE **val, unsigned char **out, const ASN1_IT
static
int
x509_name_encode
(
X509_NAME
*
a
)
{
STACK
*
intname
=
NULL
;
STACK
*
intname
=
NULL
,
**
intname_pp
=
&
intname
;
int
len
;
unsigned
char
*
p
;
STACK_OF
(
X509_NAME_ENTRY
)
*
entries
=
NULL
;
...
...
@@ -236,10 +237,12 @@ static int x509_name_encode(X509_NAME *a)
}
if
(
!
sk_X509_NAME_ENTRY_push
(
entries
,
entry
))
goto
memerr
;
}
len
=
ASN1_item_ex_i2d
((
ASN1_VALUE
**
)
&
intname
,
NULL
,
ASN1_ITEM_rptr
(
X509_NAME_INTERNAL
),
-
1
,
-
1
);
len
=
ASN1_item_ex_i2d
((
ASN1_VALUE
**
)
intname_pp
,
NULL
,
ASN1_ITEM_rptr
(
X509_NAME_INTERNAL
),
-
1
,
-
1
);
if
(
!
BUF_MEM_grow
(
a
->
bytes
,
len
))
goto
memerr
;
p
=
(
unsigned
char
*
)
a
->
bytes
->
data
;
ASN1_item_ex_i2d
((
ASN1_VALUE
**
)
&
intname
,
&
p
,
ASN1_ITEM_rptr
(
X509_NAME_INTERNAL
),
-
1
,
-
1
);
ASN1_item_ex_i2d
((
ASN1_VALUE
**
)
intname_pp
,
&
p
,
ASN1_ITEM_rptr
(
X509_NAME_INTERNAL
),
-
1
,
-
1
);
sk_pop_free
(
intname
,
sk_internal_free
);
a
->
modified
=
0
;
return
len
;
...
...
crypto/pem/pem_lib.c
浏览文件 @
a229e303
...
...
@@ -434,6 +434,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
int
o
;
const
EVP_CIPHER
*
enc
=
NULL
;
char
*
p
,
c
;
char
**
header_pp
=
&
header
;
cipher
->
cipher
=
NULL
;
if
((
header
==
NULL
)
||
(
*
header
==
'\0'
)
||
(
*
header
==
'\n'
))
...
...
@@ -480,7 +481,8 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher)
PEMerr
(
PEM_F_PEM_GET_EVP_CIPHER_INFO
,
PEM_R_UNSUPPORTED_ENCRYPTION
);
return
(
0
);
}
if
(
!
load_iv
((
unsigned
char
**
)
&
header
,
&
(
cipher
->
iv
[
0
]),
enc
->
iv_len
))
return
(
0
);
if
(
!
load_iv
((
unsigned
char
**
)
header_pp
,
&
(
cipher
->
iv
[
0
]),
enc
->
iv_len
))
return
(
0
);
return
(
1
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录