Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
469938cb
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看板
“f4d7cd4a4c25cb4a5c30a675d4cc0052c93b925a”上不存在“README.md”
提交
469938cb
编写于
24年前
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes to d2i_ASN1_OBJECT, ASN1_INTEGER_to_BN and a_strex.c
上级
eaa28181
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
9 deletion
+19
-9
CHANGES
CHANGES
+9
-0
crypto/asn1/a_int.c
crypto/asn1/a_int.c
+1
-1
crypto/asn1/a_object.c
crypto/asn1/a_object.c
+4
-3
crypto/asn1/a_strex.c
crypto/asn1/a_strex.c
+5
-5
未找到文件。
CHANGES
浏览文件 @
469938cb
...
...
@@ -4,6 +4,15 @@
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
*) Fix various signed/unsigned issues to make a_strex,c
compile under VC++.
[Oscar Jacobsson <oscar.jacobsson@celocom.com>]
*) ASN1 fixes. i2d_ASN1_OBJECT was not returning the correct
length if passed a buffer. ASN1_INTEGER_to_BN failed
if passed a NULL BN and its argument was negative.
[Steve Henson, pointed out by Sven Heiberg <sven@tartu.cyber.ee>]
*) Modification to PKCS#7 encoding routines to output definite
length encoding. Since currently the whole structures are in
memory there's not real point in using indefinite length
...
...
This diff is collapsed.
Click to expand it.
crypto/asn1/a_int.c
浏览文件 @
469938cb
...
...
@@ -465,7 +465,7 @@ BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn)
if
((
ret
=
BN_bin2bn
(
ai
->
data
,
ai
->
length
,
bn
))
==
NULL
)
ASN1err
(
ASN1_F_ASN1_INTEGER_TO_BN
,
ASN1_R_BN_LIB
);
if
(
ai
->
type
==
V_ASN1_NEG_INTEGER
)
bn
->
neg
=
1
;
if
(
ai
->
type
==
V_ASN1_NEG_INTEGER
)
ret
->
neg
=
1
;
return
(
ret
);
}
...
...
This diff is collapsed.
Click to expand it.
crypto/asn1/a_object.c
浏览文件 @
469938cb
...
...
@@ -65,11 +65,12 @@
int
i2d_ASN1_OBJECT
(
ASN1_OBJECT
*
a
,
unsigned
char
**
pp
)
{
unsigned
char
*
p
;
int
objsize
;
if
((
a
==
NULL
)
||
(
a
->
data
==
NULL
))
return
(
0
);
if
(
pp
==
NULL
)
return
(
ASN1_object_size
(
0
,
a
->
length
,
V_ASN1_OBJECT
))
;
objsize
=
ASN1_object_size
(
0
,
a
->
length
,
V_ASN1_OBJECT
);
if
(
pp
==
NULL
)
return
objsize
;
p
=
*
pp
;
ASN1_put_object
(
&
p
,
0
,
a
->
length
,
V_ASN1_OBJECT
,
V_ASN1_UNIVERSAL
);
...
...
@@ -77,7 +78,7 @@ int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp)
p
+=
a
->
length
;
*
pp
=
p
;
return
(
a
->
length
);
return
(
objsize
);
}
int
a2d_ASN1_OBJECT
(
unsigned
char
*
out
,
int
olen
,
const
char
*
buf
,
int
num
)
...
...
This diff is collapsed.
Click to expand it.
crypto/asn1/a_strex.c
浏览文件 @
469938cb
...
...
@@ -96,7 +96,7 @@ int send_bio_chars(void *arg, const void *buf, int len)
int
send_fp_chars
(
void
*
arg
,
const
void
*
buf
,
int
len
)
{
if
(
!
arg
)
return
1
;
if
(
fwrite
(
buf
,
1
,
len
,
arg
)
!=
len
)
return
0
;
if
(
fwrite
(
buf
,
1
,
len
,
arg
)
!=
(
unsigned
int
)
len
)
return
0
;
return
1
;
}
...
...
@@ -123,7 +123,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
if
(
!
io_ch
(
arg
,
tmphex
,
6
))
return
-
1
;
return
6
;
}
chtmp
=
c
;
chtmp
=
(
unsigned
char
)
c
;
if
(
chtmp
>
0x7f
)
chflgs
=
flags
&
ASN1_STRFLGS_ESC_MSB
;
else
chflgs
=
char_type
[
chtmp
]
&
flags
;
if
(
chflgs
&
CHARTYPE_BS_ESC
)
{
...
...
@@ -200,12 +200,12 @@ static int do_buf(unsigned char *buf, int buflen,
* otherwise each character will be > 0x7f and so the
* character will never be escaped on first and last.
*/
len
=
do_esc_char
(
utfbuf
[
i
],
flags
|
orflags
,
quotes
,
io_ch
,
arg
);
len
=
do_esc_char
(
utfbuf
[
i
],
(
unsigned
char
)(
flags
|
orflags
)
,
quotes
,
io_ch
,
arg
);
if
(
len
<
0
)
return
-
1
;
outlen
+=
len
;
}
}
else
{
len
=
do_esc_char
(
c
,
flags
|
orflags
,
quotes
,
io_ch
,
arg
);
len
=
do_esc_char
(
c
,
(
unsigned
char
)(
flags
|
orflags
)
,
quotes
,
io_ch
,
arg
);
if
(
len
<
0
)
return
-
1
;
outlen
+=
len
;
}
...
...
@@ -304,7 +304,7 @@ static int do_print_ex(char_io *io_ch, void *arg, unsigned long lflags, ASN1_STR
unsigned
char
flags
;
quotes
=
0
;
/* Keep a copy of escape flags */
flags
=
lflags
&
ESC_FLAGS
;
flags
=
(
unsigned
char
)(
lflags
&
ESC_FLAGS
)
;
type
=
str
->
type
;
...
...
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部