Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
51ca375e
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 搜索 >>
提交
51ca375e
编写于
1月 30, 2000
作者:
U
Ulf Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Seek out and destroy another evil cast.
上级
1749d8a0
变更
69
隐藏空白更改
内联
并排
Showing
69 changed file
with
108 addition
and
100 deletion
+108
-100
apps/s_server.c
apps/s_server.c
+1
-1
crypto/asn1/a_bitstr.c
crypto/asn1/a_bitstr.c
+1
-1
crypto/asn1/a_bytes.c
crypto/asn1/a_bytes.c
+3
-3
crypto/asn1/a_dup.c
crypto/asn1/a_dup.c
+1
-1
crypto/asn1/a_enum.c
crypto/asn1/a_enum.c
+2
-2
crypto/asn1/a_hdr.c
crypto/asn1/a_hdr.c
+1
-1
crypto/asn1/a_i2d_fp.c
crypto/asn1/a_i2d_fp.c
+1
-1
crypto/asn1/a_int.c
crypto/asn1/a_int.c
+3
-3
crypto/asn1/a_object.c
crypto/asn1/a_object.c
+1
-1
crypto/asn1/a_sign.c
crypto/asn1/a_sign.c
+3
-3
crypto/asn1/a_type.c
crypto/asn1/a_type.c
+1
-1
crypto/asn1/a_verify.c
crypto/asn1/a_verify.c
+1
-1
crypto/asn1/asn1_lib.c
crypto/asn1/asn1_lib.c
+2
-2
crypto/asn1/f_enum.c
crypto/asn1/f_enum.c
+1
-1
crypto/asn1/f_int.c
crypto/asn1/f_int.c
+1
-1
crypto/asn1/f_string.c
crypto/asn1/f_string.c
+1
-1
crypto/asn1/i2d_dhp.c
crypto/asn1/i2d_dhp.c
+1
-1
crypto/asn1/i2d_dsap.c
crypto/asn1/i2d_dsap.c
+1
-1
crypto/asn1/i2d_r_pr.c
crypto/asn1/i2d_r_pr.c
+1
-1
crypto/asn1/i2d_r_pu.c
crypto/asn1/i2d_r_pu.c
+1
-1
crypto/asn1/i2d_s_pr.c
crypto/asn1/i2d_s_pr.c
+1
-1
crypto/asn1/i2d_s_pu.c
crypto/asn1/i2d_s_pu.c
+1
-1
crypto/asn1/n_pkey.c
crypto/asn1/n_pkey.c
+2
-2
crypto/asn1/p5_pbe.c
crypto/asn1/p5_pbe.c
+1
-1
crypto/asn1/p5_pbev2.c
crypto/asn1/p5_pbev2.c
+2
-2
crypto/asn1/p7_dgst.c
crypto/asn1/p7_dgst.c
+1
-1
crypto/asn1/p7_enc.c
crypto/asn1/p7_enc.c
+1
-1
crypto/asn1/p7_enc_c.c
crypto/asn1/p7_enc_c.c
+1
-1
crypto/asn1/p7_evp.c
crypto/asn1/p7_evp.c
+1
-1
crypto/asn1/p7_i_s.c
crypto/asn1/p7_i_s.c
+1
-1
crypto/asn1/p7_lib.c
crypto/asn1/p7_lib.c
+3
-3
crypto/asn1/p7_signi.c
crypto/asn1/p7_signi.c
+1
-1
crypto/asn1/p8_key.c
crypto/asn1/p8_key.c
+1
-1
crypto/asn1/t_pkey.c
crypto/asn1/t_pkey.c
+4
-4
crypto/asn1/t_x509.c
crypto/asn1/t_x509.c
+1
-1
crypto/asn1/x_algor.c
crypto/asn1/x_algor.c
+1
-1
crypto/asn1/x_attrib.c
crypto/asn1/x_attrib.c
+1
-1
crypto/asn1/x_exten.c
crypto/asn1/x_exten.c
+1
-1
crypto/asn1/x_info.c
crypto/asn1/x_info.c
+1
-1
crypto/asn1/x_pkey.c
crypto/asn1/x_pkey.c
+2
-2
crypto/asn1/x_pubkey.c
crypto/asn1/x_pubkey.c
+1
-1
crypto/asn1/x_req.c
crypto/asn1/x_req.c
+2
-2
crypto/asn1/x_sig.c
crypto/asn1/x_sig.c
+1
-1
crypto/asn1/x_spki.c
crypto/asn1/x_spki.c
+2
-2
crypto/asn1/x_val.c
crypto/asn1/x_val.c
+1
-1
crypto/asn1/x_x509.c
crypto/asn1/x_x509.c
+1
-1
crypto/asn1/x_x509a.c
crypto/asn1/x_x509a.c
+1
-1
crypto/bio/b_sock.c
crypto/bio/b_sock.c
+1
-1
crypto/bn/bn_prime.c
crypto/bn/bn_prime.c
+7
-4
crypto/evp/p_lib.c
crypto/evp/p_lib.c
+1
-1
crypto/lhash/lhash.c
crypto/lhash/lhash.c
+4
-4
crypto/objects/o_names.c
crypto/objects/o_names.c
+2
-2
crypto/objects/obj_dat.c
crypto/objects/obj_dat.c
+1
-1
crypto/pkcs12/p12_bags.c
crypto/pkcs12/p12_bags.c
+1
-1
crypto/pkcs12/p12_lib.c
crypto/pkcs12/p12_lib.c
+1
-1
crypto/pkcs12/p12_mac.c
crypto/pkcs12/p12_mac.c
+1
-1
crypto/pkcs7/pk7_mime.c
crypto/pkcs7/pk7_mime.c
+2
-2
crypto/rsa/rsa_test.c
crypto/rsa/rsa_test.c
+5
-0
crypto/stack/stack.c
crypto/stack/stack.c
+3
-3
crypto/txt_db/txt_db.c
crypto/txt_db/txt_db.c
+1
-1
crypto/x509/by_dir.c
crypto/x509/by_dir.c
+2
-2
crypto/x509v3/v3_akey.c
crypto/x509v3/v3_akey.c
+1
-1
crypto/x509v3/v3_bcons.c
crypto/x509v3/v3_bcons.c
+1
-1
crypto/x509v3/v3_crld.c
crypto/x509v3/v3_crld.c
+2
-2
crypto/x509v3/v3_genn.c
crypto/x509v3/v3_genn.c
+2
-2
crypto/x509v3/v3_info.c
crypto/x509v3/v3_info.c
+1
-1
crypto/x509v3/v3_pku.c
crypto/x509v3/v3_pku.c
+1
-1
crypto/x509v3/v3_utl.c
crypto/x509v3/v3_utl.c
+1
-1
ssl/ssl_lib.c
ssl/ssl_lib.c
+2
-2
未找到文件。
apps/s_server.c
浏览文件 @
51ca375e
...
...
@@ -336,7 +336,7 @@ static int ebcdic_write(BIO *b, char *in, int inl)
num
=
num
+
num
;
/* double the size */
if
(
num
<
inl
)
num
=
inl
;
Free
(
(
char
*
)
wbuf
);
Free
(
wbuf
);
wbuf
=
(
EBCDIC_OUTBUFF
*
)
Malloc
(
sizeof
(
EBCDIC_OUTBUFF
)
+
num
);
wbuf
->
alloced
=
num
;
...
...
crypto/asn1/a_bitstr.c
浏览文件 @
51ca375e
...
...
@@ -173,7 +173,7 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
s
=
NULL
;
ret
->
length
=
(
int
)
len
;
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
ret
->
data
=
s
;
ret
->
type
=
V_ASN1_BIT_STRING
;
if
(
a
!=
NULL
)
(
*
a
)
=
ret
;
...
...
crypto/asn1/a_bytes.c
浏览文件 @
51ca375e
...
...
@@ -124,7 +124,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp,
else
s
=
NULL
;
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
ret
->
length
=
(
int
)
len
;
ret
->
data
=
s
;
ret
->
type
=
tag
;
...
...
@@ -218,7 +218,7 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length,
{
if
((
ret
->
length
<
len
)
||
(
ret
->
data
==
NULL
))
{
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
s
=
(
unsigned
char
*
)
Malloc
((
int
)
len
+
1
);
if
(
s
==
NULL
)
{
...
...
@@ -235,7 +235,7 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length,
else
{
s
=
NULL
;
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
}
ret
->
length
=
(
int
)
len
;
...
...
crypto/asn1/a_dup.c
浏览文件 @
51ca375e
...
...
@@ -78,6 +78,6 @@ char *ASN1_dup(int (*i2d)(), char *(*d2i)(), char *x)
i
=
i2d
(
x
,
&
p
);
p
=
b
;
ret
=
d2i
(
NULL
,
&
p
,
i
);
Free
(
(
char
*
)
b
);
Free
(
b
);
return
(
ret
);
}
crypto/asn1/a_enum.c
浏览文件 @
51ca375e
...
...
@@ -219,7 +219,7 @@ ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp,
p
+=
len
;
}
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
ret
->
data
=
s
;
ret
->
length
=
(
int
)
len
;
if
(
a
!=
NULL
)
(
*
a
)
=
ret
;
...
...
@@ -242,7 +242,7 @@ int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v)
if
(
a
->
length
<
(
sizeof
(
long
)
+
1
))
{
if
(
a
->
data
!=
NULL
)
Free
(
(
char
*
)
a
->
data
);
Free
(
a
->
data
);
if
((
a
->
data
=
(
unsigned
char
*
)
Malloc
(
sizeof
(
long
)
+
1
))
!=
NULL
)
memset
((
char
*
)
a
->
data
,
0
,
sizeof
(
long
)
+
1
);
}
...
...
crypto/asn1/a_hdr.c
浏览文件 @
51ca375e
...
...
@@ -115,5 +115,5 @@ void ASN1_HEADER_free(ASN1_HEADER *a)
M_ASN1_OCTET_STRING_free
(
a
->
header
);
if
(
a
->
meth
!=
NULL
)
a
->
meth
->
destroy
(
a
->
data
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/a_i2d_fp.c
浏览文件 @
51ca375e
...
...
@@ -108,6 +108,6 @@ int ASN1_i2d_bio(int (*i2d)(), BIO *out, unsigned char *x)
j
+=
i
;
n
-=
i
;
}
Free
(
(
char
*
)
b
);
Free
(
b
);
return
(
ret
);
}
crypto/asn1/a_int.c
浏览文件 @
51ca375e
...
...
@@ -248,7 +248,7 @@ ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp,
memcpy
(
s
,
p
,(
int
)
len
);
}
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
ret
->
data
=
s
;
ret
->
length
=
(
int
)
len
;
if
(
a
!=
NULL
)
(
*
a
)
=
ret
;
...
...
@@ -317,7 +317,7 @@ ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, unsigned char **pp,
p
+=
len
;
}
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
ret
->
data
=
s
;
ret
->
length
=
(
int
)
len
;
if
(
a
!=
NULL
)
(
*
a
)
=
ret
;
...
...
@@ -340,7 +340,7 @@ int ASN1_INTEGER_set(ASN1_INTEGER *a, long v)
if
(
a
->
length
<
(
sizeof
(
long
)
+
1
))
{
if
(
a
->
data
!=
NULL
)
Free
(
(
char
*
)
a
->
data
);
Free
(
a
->
data
);
if
((
a
->
data
=
(
unsigned
char
*
)
Malloc
(
sizeof
(
long
)
+
1
))
!=
NULL
)
memset
((
char
*
)
a
->
data
,
0
,
sizeof
(
long
)
+
1
);
}
...
...
crypto/asn1/a_object.c
浏览文件 @
51ca375e
...
...
@@ -222,7 +222,7 @@ ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
}
if
((
ret
->
data
==
NULL
)
||
(
ret
->
length
<
len
))
{
if
(
ret
->
data
!=
NULL
)
Free
(
(
char
*
)
ret
->
data
);
if
(
ret
->
data
!=
NULL
)
Free
(
ret
->
data
);
ret
->
data
=
(
unsigned
char
*
)
Malloc
(
len
?
(
int
)
len
:
1
);
ret
->
flags
|=
ASN1_OBJECT_FLAG_DYNAMIC_DATA
;
if
(
ret
->
data
==
NULL
)
...
...
crypto/asn1/a_sign.c
浏览文件 @
51ca375e
...
...
@@ -129,7 +129,7 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
ASN1err
(
ASN1_F_ASN1_SIGN
,
ERR_R_EVP_LIB
);
goto
err
;
}
if
(
signature
->
data
!=
NULL
)
Free
(
(
char
*
)
signature
->
data
);
if
(
signature
->
data
!=
NULL
)
Free
(
signature
->
data
);
signature
->
data
=
buf_out
;
buf_out
=
NULL
;
signature
->
length
=
outl
;
...
...
@@ -141,8 +141,8 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
err:
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
if
(
buf_in
!=
NULL
)
{
memset
((
char
*
)
buf_in
,
0
,(
unsigned
int
)
inl
);
Free
(
(
char
*
)
buf_in
);
}
{
memset
((
char
*
)
buf_in
,
0
,(
unsigned
int
)
inl
);
Free
(
buf_in
);
}
if
(
buf_out
!=
NULL
)
{
memset
((
char
*
)
buf_out
,
0
,
outll
);
Free
(
(
char
*
)
buf_out
);
}
{
memset
((
char
*
)
buf_out
,
0
,
outll
);
Free
(
buf_out
);
}
return
(
outl
);
}
crypto/asn1/a_type.c
浏览文件 @
51ca375e
...
...
@@ -282,7 +282,7 @@ void ASN1_TYPE_free(ASN1_TYPE *a)
{
if
(
a
==
NULL
)
return
;
ASN1_TYPE_component_free
(
a
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
ASN1_TYPE_get
(
ASN1_TYPE
*
a
)
...
...
crypto/asn1/a_verify.c
浏览文件 @
51ca375e
...
...
@@ -101,7 +101,7 @@ int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
EVP_VerifyUpdate
(
&
ctx
,(
unsigned
char
*
)
buf_in
,
inl
);
memset
(
buf_in
,
0
,(
unsigned
int
)
inl
);
Free
(
(
char
*
)
buf_in
);
Free
(
buf_in
);
if
(
EVP_VerifyFinal
(
&
ctx
,(
unsigned
char
*
)
signature
->
data
,
(
unsigned
int
)
signature
->
length
,
pkey
)
<=
0
)
...
...
crypto/asn1/asn1_lib.c
浏览文件 @
51ca375e
...
...
@@ -381,8 +381,8 @@ ASN1_STRING *ASN1_STRING_type_new(int type)
void
ASN1_STRING_free
(
ASN1_STRING
*
a
)
{
if
(
a
==
NULL
)
return
;
if
(
a
->
data
!=
NULL
)
Free
(
(
char
*
)
a
->
data
);
Free
(
(
char
*
)
a
);
if
(
a
->
data
!=
NULL
)
Free
(
a
->
data
);
Free
(
a
);
}
int
ASN1_STRING_cmp
(
ASN1_STRING
*
a
,
ASN1_STRING
*
b
)
...
...
crypto/asn1/f_enum.c
浏览文件 @
51ca375e
...
...
@@ -161,7 +161,7 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size)
if
(
sp
==
NULL
)
{
ASN1err
(
ASN1_F_A2I_ASN1_ENUMERATED
,
ERR_R_MALLOC_FAILURE
);
if
(
s
!=
NULL
)
Free
(
(
char
*
)
s
);
if
(
s
!=
NULL
)
Free
(
s
);
goto
err
;
}
s
=
sp
;
...
...
crypto/asn1/f_int.c
浏览文件 @
51ca375e
...
...
@@ -168,7 +168,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
if
(
sp
==
NULL
)
{
ASN1err
(
ASN1_F_A2I_ASN1_INTEGER
,
ERR_R_MALLOC_FAILURE
);
if
(
s
!=
NULL
)
Free
(
(
char
*
)
s
);
if
(
s
!=
NULL
)
Free
(
s
);
goto
err
;
}
s
=
sp
;
...
...
crypto/asn1/f_string.c
浏览文件 @
51ca375e
...
...
@@ -166,7 +166,7 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
if
(
sp
==
NULL
)
{
ASN1err
(
ASN1_F_A2I_ASN1_STRING
,
ERR_R_MALLOC_FAILURE
);
if
(
s
!=
NULL
)
Free
(
(
char
*
)
s
);
if
(
s
!=
NULL
)
Free
(
s
);
goto
err
;
}
s
=
sp
;
...
...
crypto/asn1/i2d_dhp.c
浏览文件 @
51ca375e
...
...
@@ -118,7 +118,7 @@ int i2d_DHparams(DH *a, unsigned char **pp)
bs
.
length
=
BN_bn2bin
(
num
[
i
],
bs
.
data
);
i2d_ASN1_INTEGER
(
&
bs
,
&
p
);
}
Free
(
(
char
*
)
bs
.
data
);
Free
(
bs
.
data
);
ret
=
t
;
err:
if
(
num
[
2
]
!=
NULL
)
BN_free
(
num
[
2
]);
...
...
crypto/asn1/i2d_dsap.c
浏览文件 @
51ca375e
...
...
@@ -107,7 +107,7 @@ int i2d_DSAparams(DSA *a, unsigned char **pp)
bs
.
length
=
BN_bn2bin
(
num
[
i
],
bs
.
data
);
i2d_ASN1_INTEGER
(
&
bs
,
&
p
);
}
Free
(
(
char
*
)
bs
.
data
);
Free
(
bs
.
data
);
ret
=
t
;
err:
*
pp
=
p
;
...
...
crypto/asn1/i2d_r_pr.c
浏览文件 @
51ca375e
...
...
@@ -119,7 +119,7 @@ int i2d_RSAPrivateKey(RSA *a, unsigned char **pp)
bs
.
length
=
BN_bn2bin
(
num
[
i
],
bs
.
data
);
i2d_ASN1_INTEGER
(
&
bs
,
&
p
);
}
Free
(
(
char
*
)
bs
.
data
);
Free
(
bs
.
data
);
*
pp
=
p
;
return
(
t
);
}
...
...
crypto/asn1/i2d_r_pu.c
浏览文件 @
51ca375e
...
...
@@ -105,7 +105,7 @@ int i2d_RSAPublicKey(RSA *a, unsigned char **pp)
bs
.
length
=
BN_bn2bin
(
num
[
i
],
bs
.
data
);
i2d_ASN1_INTEGER
(
&
bs
,
&
p
);
}
Free
(
(
char
*
)
bs
.
data
);
Free
(
bs
.
data
);
*
pp
=
p
;
return
(
t
);
}
...
...
crypto/asn1/i2d_s_pr.c
浏览文件 @
51ca375e
...
...
@@ -116,7 +116,7 @@ int i2d_DSAPrivateKey(DSA *a, unsigned char **pp)
bs
.
length
=
BN_bn2bin
(
num
[
i
],
bs
.
data
);
i2d_ASN1_INTEGER
(
&
bs
,
&
p
);
}
Free
(
(
char
*
)
bs
.
data
);
Free
(
bs
.
data
);
*
pp
=
p
;
return
(
t
);
}
...
...
crypto/asn1/i2d_s_pu.c
浏览文件 @
51ca375e
...
...
@@ -121,7 +121,7 @@ int i2d_DSAPublicKey(DSA *a, unsigned char **pp)
bs
.
length
=
BN_bn2bin
(
num
[
i
],
bs
.
data
);
i2d_ASN1_INTEGER
(
&
bs
,
&
p
);
}
Free
(
(
char
*
)
bs
.
data
);
Free
(
bs
.
data
);
*
pp
=
p
;
if
(
all
)
return
(
t
);
else
return
(
tot
);
...
...
crypto/asn1/n_pkey.c
浏览文件 @
51ca375e
...
...
@@ -139,7 +139,7 @@ int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)())
}
if
(
pkey
->
private_key
->
data
!=
NULL
)
Free
(
(
char
*
)
pkey
->
private_key
->
data
);
Free
(
pkey
->
private_key
->
data
);
if
((
pkey
->
private_key
->
data
=
(
unsigned
char
*
)
Malloc
(
l
[
0
]))
==
NULL
)
{
ASN1err
(
ASN1_F_I2D_NETSCAPE_RSA
,
ERR_R_MALLOC_FAILURE
);
...
...
@@ -334,7 +334,7 @@ static void NETSCAPE_PKEY_free(NETSCAPE_PKEY *a)
M_ASN1_INTEGER_free
(
a
->
version
);
X509_ALGOR_free
(
a
->
algor
);
M_ASN1_OCTET_STRING_free
(
a
->
private_key
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
#endif
/* NO_RC4 */
...
...
crypto/asn1/p5_pbe.c
浏览文件 @
51ca375e
...
...
@@ -103,7 +103,7 @@ void PBEPARAM_free (PBEPARAM *a)
if
(
a
==
NULL
)
return
;
M_ASN1_OCTET_STRING_free
(
a
->
salt
);
M_ASN1_INTEGER_free
(
a
->
iter
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
/* Return an algorithm identifier for a PKCS#5 PBE algorithm */
...
...
crypto/asn1/p5_pbev2.c
浏览文件 @
51ca375e
...
...
@@ -104,7 +104,7 @@ void PBE2PARAM_free (PBE2PARAM *a)
if
(
a
==
NULL
)
return
;
X509_ALGOR_free
(
a
->
keyfunc
);
X509_ALGOR_free
(
a
->
encryption
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
i2d_PBKDF2PARAM
(
PBKDF2PARAM
*
a
,
unsigned
char
**
pp
)
...
...
@@ -158,7 +158,7 @@ void PBKDF2PARAM_free (PBKDF2PARAM *a)
M_ASN1_INTEGER_free
(
a
->
iter
);
M_ASN1_INTEGER_free
(
a
->
keylength
);
X509_ALGOR_free
(
a
->
prf
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
/* Return an algorithm identifier for a PKCS#5 v2.0 PBE algorithm:
...
...
crypto/asn1/p7_dgst.c
浏览文件 @
51ca375e
...
...
@@ -116,6 +116,6 @@ void PKCS7_DIGEST_free(PKCS7_DIGEST *a)
X509_ALGOR_free
(
a
->
md
);
PKCS7_free
(
a
->
contents
);
M_ASN1_OCTET_STRING_free
(
a
->
digest
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/p7_enc.c
浏览文件 @
51ca375e
...
...
@@ -106,6 +106,6 @@ void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a)
if
(
a
==
NULL
)
return
;
M_ASN1_INTEGER_free
(
a
->
version
);
PKCS7_ENC_CONTENT_free
(
a
->
enc_data
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/p7_enc_c.c
浏览文件 @
51ca375e
...
...
@@ -115,6 +115,6 @@ void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a)
ASN1_OBJECT_free
(
a
->
content_type
);
X509_ALGOR_free
(
a
->
algorithm
);
M_ASN1_OCTET_STRING_free
(
a
->
enc_data
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/p7_evp.c
浏览文件 @
51ca375e
...
...
@@ -114,6 +114,6 @@ void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a)
M_ASN1_INTEGER_free
(
a
->
version
);
sk_PKCS7_RECIP_INFO_pop_free
(
a
->
recipientinfo
,
PKCS7_RECIP_INFO_free
);
PKCS7_ENC_CONTENT_free
(
a
->
enc_data
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/p7_i_s.c
浏览文件 @
51ca375e
...
...
@@ -106,6 +106,6 @@ void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a)
if
(
a
==
NULL
)
return
;
X509_NAME_free
(
a
->
issuer
);
M_ASN1_INTEGER_free
(
a
->
serial
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/p7_lib.c
浏览文件 @
51ca375e
...
...
@@ -152,7 +152,7 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length)
{
if
((
*
a
)
->
asn1
!=
NULL
)
{
Free
((
char
*
)(
*
a
)
->
asn1
);
Free
((
*
a
)
->
asn1
);
(
*
a
)
->
asn1
=
NULL
;
}
(
*
a
)
->
length
=
0
;
...
...
@@ -251,7 +251,7 @@ void PKCS7_free(PKCS7 *a)
{
ASN1_OBJECT_free
(
a
->
type
);
}
Free
(
(
char
*
)
a
);
Free
(
a
);
}
void
PKCS7_content_free
(
PKCS7
*
a
)
...
...
@@ -259,7 +259,7 @@ void PKCS7_content_free(PKCS7 *a)
if
(
a
==
NULL
)
return
;
if
(
a
->
asn1
!=
NULL
)
Free
(
(
char
*
)
a
->
asn1
);
if
(
a
->
asn1
!=
NULL
)
Free
(
a
->
asn1
);
if
(
a
->
d
.
ptr
!=
NULL
)
{
...
...
crypto/asn1/p7_signi.c
浏览文件 @
51ca375e
...
...
@@ -143,7 +143,7 @@ void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a)
sk_X509_ATTRIBUTE_pop_free
(
a
->
unauth_attr
,
X509_ATTRIBUTE_free
);
if
(
a
->
pkey
!=
NULL
)
EVP_PKEY_free
(
a
->
pkey
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
IMPLEMENT_STACK_OF
(
PKCS7_SIGNER_INFO
)
...
...
crypto/asn1/p8_key.c
浏览文件 @
51ca375e
...
...
@@ -126,6 +126,6 @@ void X509_KEY_free(X509 *a)
X509_CINF_free
(
a
->
cert_info
);
X509_ALGOR_free
(
a
->
sig_alg
);
ASN1_BIT_STRING_free
(
a
->
signature
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/t_pkey.c
浏览文件 @
51ca375e
...
...
@@ -133,7 +133,7 @@ int RSA_print(BIO *bp, RSA *x, int off)
if
(
!
print
(
bp
,
"coefficient:"
,
x
->
iqmp
,
m
,
off
))
goto
err
;
ret
=
1
;
err:
if
(
m
!=
NULL
)
Free
(
(
char
*
)
m
);
if
(
m
!=
NULL
)
Free
(
m
);
return
(
ret
);
}
#endif
/* NO_RSA */
...
...
@@ -204,7 +204,7 @@ int DSA_print(BIO *bp, DSA *x, int off)
if
((
x
->
g
!=
NULL
)
&&
!
print
(
bp
,
"G: "
,
x
->
g
,
m
,
off
))
goto
err
;
ret
=
1
;
err:
if
(
m
!=
NULL
)
Free
(
(
char
*
)
m
);
if
(
m
!=
NULL
)
Free
(
m
);
return
(
ret
);
}
#endif
/* !NO_DSA */
...
...
@@ -307,7 +307,7 @@ int DHparams_print(BIO *bp, DH *x)
err:
DHerr
(
DH_F_DHPARAMS_PRINT
,
reason
);
}
if
(
m
!=
NULL
)
Free
(
(
char
*
)
m
);
if
(
m
!=
NULL
)
Free
(
m
);
return
(
ret
);
}
#endif
...
...
@@ -352,7 +352,7 @@ int DSAparams_print(BIO *bp, DSA *x)
if
(
!
print
(
bp
,
"g:"
,
x
->
g
,
m
,
4
))
goto
err
;
ret
=
1
;
err:
if
(
m
!=
NULL
)
Free
(
(
char
*
)
m
);
if
(
m
!=
NULL
)
Free
(
m
);
DSAerr
(
DSA_F_DSAPARAMS_PRINT
,
reason
);
return
(
ret
);
}
...
...
crypto/asn1/t_x509.c
浏览文件 @
51ca375e
...
...
@@ -223,7 +223,7 @@ int X509_print(BIO *bp, X509 *x)
ret
=
1
;
err:
if
(
str
!=
NULL
)
ASN1_STRING_free
(
str
);
if
(
m
!=
NULL
)
Free
(
(
char
*
)
m
);
if
(
m
!=
NULL
)
Free
(
m
);
return
(
ret
);
}
...
...
crypto/asn1/x_algor.c
浏览文件 @
51ca375e
...
...
@@ -111,7 +111,7 @@ void X509_ALGOR_free(X509_ALGOR *a)
if
(
a
==
NULL
)
return
;
ASN1_OBJECT_free
(
a
->
algorithm
);
ASN1_TYPE_free
(
a
->
parameter
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
IMPLEMENT_STACK_OF
(
X509_ALGOR
)
...
...
crypto/asn1/x_attrib.c
浏览文件 @
51ca375e
...
...
@@ -160,6 +160,6 @@ void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a)
sk_ASN1_TYPE_pop_free
(
a
->
value
.
set
,
ASN1_TYPE_free
);
else
ASN1_TYPE_free
(
a
->
value
.
single
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/x_exten.c
浏览文件 @
51ca375e
...
...
@@ -134,6 +134,6 @@ void X509_EXTENSION_free(X509_EXTENSION *a)
if
(
a
==
NULL
)
return
;
ASN1_OBJECT_free
(
a
->
object
);
M_ASN1_OCTET_STRING_free
(
a
->
value
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/x_info.c
浏览文件 @
51ca375e
...
...
@@ -107,7 +107,7 @@ void X509_INFO_free(X509_INFO *x)
if
(
x
->
crl
!=
NULL
)
X509_CRL_free
(
x
->
crl
);
if
(
x
->
x_pkey
!=
NULL
)
X509_PKEY_free
(
x
->
x_pkey
);
if
(
x
->
enc_data
!=
NULL
)
Free
(
x
->
enc_data
);
Free
(
(
char
*
)
x
);
Free
(
x
);
}
IMPLEMENT_STACK_OF
(
X509_INFO
)
...
...
crypto/asn1/x_pkey.c
浏览文件 @
51ca375e
...
...
@@ -146,6 +146,6 @@ void X509_PKEY_free(X509_PKEY *x)
if
(
x
->
enc_algor
!=
NULL
)
X509_ALGOR_free
(
x
->
enc_algor
);
if
(
x
->
enc_pkey
!=
NULL
)
M_ASN1_OCTET_STRING_free
(
x
->
enc_pkey
);
if
(
x
->
dec_pkey
!=
NULL
)
EVP_PKEY_free
(
x
->
dec_pkey
);
if
((
x
->
key_data
!=
NULL
)
&&
(
x
->
key_free
))
Free
(
(
char
*
)
x
->
key_data
);
Free
(
(
char
*
)
x
);
if
((
x
->
key_data
!=
NULL
)
&&
(
x
->
key_free
))
Free
(
x
->
key_data
);
Free
(
x
);
}
crypto/asn1/x_pubkey.c
浏览文件 @
51ca375e
...
...
@@ -112,7 +112,7 @@ void X509_PUBKEY_free(X509_PUBKEY *a)
X509_ALGOR_free
(
a
->
algor
);
M_ASN1_BIT_STRING_free
(
a
->
public_key
);
if
(
a
->
pkey
!=
NULL
)
EVP_PKEY_free
(
a
->
pkey
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
X509_PUBKEY_set
(
X509_PUBKEY
**
x
,
EVP_PKEY
*
pkey
)
...
...
crypto/asn1/x_req.c
浏览文件 @
51ca375e
...
...
@@ -163,7 +163,7 @@ void X509_REQ_INFO_free(X509_REQ_INFO *a)
X509_NAME_free
(
a
->
subject
);
X509_PUBKEY_free
(
a
->
pubkey
);
sk_X509_ATTRIBUTE_pop_free
(
a
->
attributes
,
X509_ATTRIBUTE_free
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
i2d_X509_REQ
(
X509_REQ
*
a
,
unsigned
char
**
pp
)
...
...
@@ -230,7 +230,7 @@ void X509_REQ_free(X509_REQ *a)
X509_REQ_INFO_free
(
a
->
req_info
);
X509_ALGOR_free
(
a
->
sig_alg
);
M_ASN1_BIT_STRING_free
(
a
->
signature
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/x_sig.c
浏览文件 @
51ca375e
...
...
@@ -104,7 +104,7 @@ void X509_SIG_free(X509_SIG *a)
if
(
a
==
NULL
)
return
;
X509_ALGOR_free
(
a
->
algor
);
M_ASN1_OCTET_STRING_free
(
a
->
digest
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/x_spki.c
浏览文件 @
51ca375e
...
...
@@ -109,7 +109,7 @@ void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a)
if
(
a
==
NULL
)
return
;
X509_PUBKEY_free
(
a
->
pubkey
);
M_ASN1_IA5STRING_free
(
a
->
challenge
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
i2d_NETSCAPE_SPKI
(
NETSCAPE_SPKI
*
a
,
unsigned
char
**
pp
)
...
...
@@ -161,6 +161,6 @@ void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a)
NETSCAPE_SPKAC_free
(
a
->
spkac
);
X509_ALGOR_free
(
a
->
sig_algor
);
M_ASN1_BIT_STRING_free
(
a
->
signature
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/x_val.c
浏览文件 @
51ca375e
...
...
@@ -104,6 +104,6 @@ void X509_VAL_free(X509_VAL *a)
if
(
a
==
NULL
)
return
;
M_ASN1_TIME_free
(
a
->
notBefore
);
M_ASN1_TIME_free
(
a
->
notAfter
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/asn1/x_x509.c
浏览文件 @
51ca375e
...
...
@@ -153,7 +153,7 @@ void X509_free(X509 *a)
X509_CERT_AUX_free
(
a
->
aux
);
if
(
a
->
name
!=
NULL
)
Free
(
a
->
name
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
X509_get_ex_new_index
(
long
argl
,
void
*
argp
,
CRYPTO_EX_new
*
new_func
,
...
...
crypto/asn1/x_x509a.c
浏览文件 @
51ca375e
...
...
@@ -111,7 +111,7 @@ void X509_CERT_AUX_free(X509_CERT_AUX *a)
ASN1_UTF8STRING_free
(
a
->
alias
);
ASN1_OCTET_STRING_free
(
a
->
keyid
);
ASN1_TYPE_free
(
a
->
other
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
i2d_X509_CERT_AUX
(
X509_CERT_AUX
*
a
,
unsigned
char
**
pp
)
...
...
crypto/bio/b_sock.c
浏览文件 @
51ca375e
...
...
@@ -334,7 +334,7 @@ static void ghbn_free(struct hostent *a)
Free
(
a
->
h_addr_list
[
i
]);
Free
(
a
->
h_addr_list
);
}
if
(
a
->
h_name
!=
NULL
)
Free
(
(
char
*
)
a
->
h_name
);
if
(
a
->
h_name
!=
NULL
)
Free
(
a
->
h_name
);
Free
(
a
);
}
...
...
crypto/bn/bn_prime.c
浏览文件 @
51ca375e
...
...
@@ -83,11 +83,13 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, BIGNUM *add,
BIGNUM
t
;
int
found
=
0
;
int
i
,
j
,
c1
=
0
;
BN_CTX
*
ctx
;
BN_CTX
*
ctx
,
*
ctx2
=
NULL
;
int
checks
=
BN_prime_checks_for_size
(
bits
);
ctx
=
BN_CTX_new
();
if
(
ctx
==
NULL
)
goto
err
;
ctx2
=
BN_CTX_new
();
if
(
ctx2
==
NULL
)
goto
err
;
if
(
ret
==
NULL
)
{
if
((
rnd
=
BN_new
())
==
NULL
)
goto
err
;
...
...
@@ -119,7 +121,7 @@ loop:
if
(
!
safe
)
{
i
=
BN_is_prime
(
rnd
,
checks
,
callback
,
ctx
,
cb_arg
);
i
=
BN_is_prime
_fasttest
(
rnd
,
checks
,
callback
,
ctx
,
ctx2
,
cb_arg
,
0
);
if
(
i
==
-
1
)
goto
err
;
if
(
i
==
0
)
goto
loop
;
}
...
...
@@ -133,11 +135,11 @@ loop:
for
(
i
=
0
;
i
<
checks
;
i
++
)
{
j
=
BN_is_prime
(
rnd
,
1
,
callback
,
ctx
,
cb_arg
);
j
=
BN_is_prime
_fasttest
(
rnd
,
1
,
callback
,
ctx
,
ctx2
,
cb_arg
,
0
);
if
(
j
==
-
1
)
goto
err
;
if
(
j
==
0
)
goto
loop
;
j
=
BN_is_prime
(
&
t
,
1
,
callback
,
ctx
,
cb_arg
);
j
=
BN_is_prime
_fasttest
(
&
t
,
1
,
callback
,
ctx
,
ctx2
,
cb_arg
,
0
);
if
(
j
==
-
1
)
goto
err
;
if
(
j
==
0
)
goto
loop
;
...
...
@@ -151,6 +153,7 @@ err:
if
(
!
found
&&
(
ret
==
NULL
)
&&
(
rnd
!=
NULL
))
BN_free
(
rnd
);
BN_free
(
&
t
);
if
(
ctx
!=
NULL
)
BN_CTX_free
(
ctx
);
if
(
ctx2
!=
NULL
)
BN_CTX_free
(
ctx2
);
return
(
found
?
rnd
:
NULL
);
}
...
...
crypto/evp/p_lib.c
浏览文件 @
51ca375e
...
...
@@ -302,7 +302,7 @@ void EVP_PKEY_free(EVP_PKEY *x)
}
#endif
EVP_PKEY_free_it
(
x
);
Free
(
(
char
*
)
x
);
Free
(
x
);
}
static
void
EVP_PKEY_free_it
(
EVP_PKEY
*
x
)
...
...
crypto/lhash/lhash.c
浏览文件 @
51ca375e
...
...
@@ -149,7 +149,7 @@ LHASH *lh_new(unsigned long (*h)(), int (*c)())
ret
->
error
=
0
;
return
(
ret
);
err1:
Free
(
(
char
*
)
ret
);
Free
(
ret
);
err0:
return
(
NULL
);
}
...
...
@@ -172,8 +172,8 @@ void lh_free(LHASH *lh)
n
=
nn
;
}
}
Free
(
(
char
*
)
lh
->
b
);
Free
(
(
char
*
)
lh
);
Free
(
lh
->
b
);
Free
(
lh
);
}
void
*
lh_insert
(
LHASH
*
lh
,
void
*
data
)
...
...
@@ -233,7 +233,7 @@ void *lh_delete(LHASH *lh, void *data)
nn
=
*
rn
;
*
rn
=
nn
->
next
;
ret
=
nn
->
data
;
Free
(
(
char
*
)
nn
);
Free
(
nn
);
lh
->
num_delete
++
;
}
...
...
crypto/objects/o_names.c
浏览文件 @
51ca375e
...
...
@@ -181,7 +181,7 @@ int OBJ_NAME_add(const char *name, int type, const char *data)
sk_NAME_FUNCS_value
(
name_funcs_stack
,
ret
->
type
)
->
free_func
(
ret
->
name
,
ret
->
type
,
ret
->
data
);
}
Free
(
(
char
*
)
ret
);
Free
(
ret
);
}
else
{
...
...
@@ -216,7 +216,7 @@ int OBJ_NAME_remove(const char *name, int type)
sk_NAME_FUNCS_value
(
name_funcs_stack
,
ret
->
type
)
->
free_func
(
ret
->
name
,
ret
->
type
,
ret
->
data
);
}
Free
(
(
char
*
)
ret
);
Free
(
ret
);
return
(
1
);
}
else
...
...
crypto/objects/obj_dat.c
浏览文件 @
51ca375e
...
...
@@ -643,7 +643,7 @@ int OBJ_create(char *oid, char *sn, char *ln)
ok
=
OBJ_add_object
(
op
);
err:
ASN1_OBJECT_free
(
op
);
Free
(
(
char
*
)
buf
);
Free
(
buf
);
return
(
ok
);
}
crypto/pkcs12/p12_bags.c
浏览文件 @
51ca375e
...
...
@@ -188,5 +188,5 @@ void PKCS12_BAGS_free (PKCS12_BAGS *a)
}
ASN1_OBJECT_free
(
a
->
type
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/pkcs12/p12_lib.c
浏览文件 @
51ca375e
...
...
@@ -107,5 +107,5 @@ void PKCS12_free (PKCS12 *a)
M_ASN1_INTEGER_free
(
a
->
version
);
PKCS12_MAC_DATA_free
(
a
->
mac
);
PKCS7_free
(
a
->
authsafes
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/pkcs12/p12_mac.c
浏览文件 @
51ca375e
...
...
@@ -106,5 +106,5 @@ void PKCS12_MAC_DATA_free (PKCS12_MAC_DATA *a)
X509_SIG_free
(
a
->
dinfo
);
M_ASN1_OCTET_STRING_free
(
a
->
salt
);
M_ASN1_INTEGER_free
(
a
->
iter
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/pkcs7/pk7_mime.c
浏览文件 @
51ca375e
...
...
@@ -643,14 +643,14 @@ static void mime_hdr_free(MIME_HEADER *hdr)
if
(
hdr
->
name
)
Free
(
hdr
->
name
);
if
(
hdr
->
value
)
Free
(
hdr
->
value
);
if
(
hdr
->
params
)
sk_pop_free
(
hdr
->
params
,
mime_param_free
);
Free
(
(
char
*
)
hdr
);
Free
(
hdr
);
}
static
void
mime_param_free
(
MIME_PARAM
*
param
)
{
if
(
param
->
param_name
)
Free
(
param
->
param_name
);
if
(
param
->
param_value
)
Free
(
param
->
param_value
);
Free
(
(
char
*
)
param
);
Free
(
param
);
}
/* Check for a multipart boundary. Returns:
...
...
crypto/rsa/rsa_test.c
浏览文件 @
51ca375e
...
...
@@ -227,6 +227,10 @@ int main(int argc, char *argv[])
for
(
v
=
0
;
v
<
3
;
v
++
)
{
#if 1
key
=
RSA_generate_key
(
512
*
(
v
+
1
),
3
,
0
,
0
);
clen
=
RSA_size
(
key
);
#else
key
=
RSA_new
();
switch
(
v
)
{
case
0
:
...
...
@@ -239,6 +243,7 @@ int main(int argc, char *argv[])
clen
=
key3
(
key
,
ctext_ex
);
break
;
}
#endif
num
=
RSA_public_encrypt
(
plen
,
ptext_ex
,
ctext
,
key
,
RSA_PKCS1_PADDING
);
...
...
crypto/stack/stack.c
浏览文件 @
51ca375e
...
...
@@ -126,7 +126,7 @@ STACK *sk_new(int (*c)())
ret
->
sorted
=
0
;
return
(
ret
);
err1:
Free
(
(
char
*
)
ret
);
Free
(
ret
);
err0:
return
(
NULL
);
}
...
...
@@ -276,8 +276,8 @@ void sk_pop_free(STACK *st, void (*func)())
void
sk_free
(
STACK
*
st
)
{
if
(
st
==
NULL
)
return
;
if
(
st
->
data
!=
NULL
)
Free
(
(
char
*
)
st
->
data
);
Free
(
(
char
*
)
st
);
if
(
st
->
data
!=
NULL
)
Free
(
st
->
data
);
Free
(
st
);
}
int
sk_num
(
STACK
*
st
)
...
...
crypto/txt_db/txt_db.c
浏览文件 @
51ca375e
...
...
@@ -181,7 +181,7 @@ err:
#endif
if
(
ret
->
data
!=
NULL
)
sk_free
(
ret
->
data
);
if
(
ret
->
index
!=
NULL
)
Free
(
ret
->
index
);
if
(
ret
->
qual
!=
NULL
)
Free
(
(
char
*
)
ret
->
qual
);
if
(
ret
->
qual
!=
NULL
)
Free
(
ret
->
qual
);
if
(
ret
!=
NULL
)
Free
(
ret
);
return
(
NULL
);
}
...
...
crypto/x509/by_dir.c
浏览文件 @
51ca375e
...
...
@@ -218,9 +218,9 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type)
memcpy
(
ip
,
ctx
->
dirs_type
,(
ctx
->
num_dirs_alloced
-
10
)
*
sizeof
(
int
));
if
(
ctx
->
dirs
!=
NULL
)
Free
(
(
char
*
)
ctx
->
dirs
);
Free
(
ctx
->
dirs
);
if
(
ctx
->
dirs_type
!=
NULL
)
Free
(
(
char
*
)
ctx
->
dirs_type
);
Free
(
ctx
->
dirs_type
);
ctx
->
dirs
=
pp
;
ctx
->
dirs_type
=
ip
;
}
...
...
crypto/x509v3/v3_akey.c
浏览文件 @
51ca375e
...
...
@@ -132,7 +132,7 @@ void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a)
M_ASN1_OCTET_STRING_free
(
a
->
keyid
);
sk_GENERAL_NAME_pop_free
(
a
->
issuer
,
GENERAL_NAME_free
);
M_ASN1_INTEGER_free
(
a
->
serial
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
static
STACK_OF
(
CONF_VALUE
)
*
i2v_AUTHORITY_KEYID
(
X509V3_EXT_METHOD
*
method
,
...
...
crypto/x509v3/v3_bcons.c
浏览文件 @
51ca375e
...
...
@@ -123,7 +123,7 @@ void BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a)
{
if
(
a
==
NULL
)
return
;
M_ASN1_INTEGER_free
(
a
->
pathlen
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
static
STACK_OF
(
CONF_VALUE
)
*
i2v_BASIC_CONSTRAINTS
(
X509V3_EXT_METHOD
*
method
,
...
...
crypto/x509v3/v3_crld.c
浏览文件 @
51ca375e
...
...
@@ -213,7 +213,7 @@ void DIST_POINT_free(DIST_POINT *a)
DIST_POINT_NAME_free
(
a
->
distpoint
);
M_ASN1_BIT_STRING_free
(
a
->
reasons
);
sk_GENERAL_NAME_pop_free
(
a
->
CRLissuer
,
GENERAL_NAME_free
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
int
i2d_DIST_POINT_NAME
(
DIST_POINT_NAME
*
a
,
unsigned
char
**
pp
)
...
...
@@ -256,7 +256,7 @@ void DIST_POINT_NAME_free(DIST_POINT_NAME *a)
if
(
a
==
NULL
)
return
;
sk_X509_NAME_ENTRY_pop_free
(
a
->
relativename
,
X509_NAME_ENTRY_free
);
sk_GENERAL_NAME_pop_free
(
a
->
fullname
,
GENERAL_NAME_free
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
DIST_POINT_NAME
*
d2i_DIST_POINT_NAME
(
DIST_POINT_NAME
**
a
,
unsigned
char
**
pp
,
...
...
crypto/x509v3/v3_genn.c
浏览文件 @
51ca375e
...
...
@@ -211,7 +211,7 @@ void GENERAL_NAME_free(GENERAL_NAME *a)
break
;
}
Free
(
(
char
*
)
a
);
Free
(
a
);
}
/* Now the GeneralNames versions: a SEQUENCE OF GeneralName. These are needed as
...
...
@@ -286,6 +286,6 @@ void OTHERNAME_free(OTHERNAME *a)
if
(
a
==
NULL
)
return
;
ASN1_OBJECT_free
(
a
->
type_id
);
ASN1_TYPE_free
(
a
->
value
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
crypto/x509v3/v3_info.c
浏览文件 @
51ca375e
...
...
@@ -204,7 +204,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a)
if
(
a
==
NULL
)
return
;
ASN1_OBJECT_free
(
a
->
method
);
GENERAL_NAME_free
(
a
->
location
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
STACK_OF
(
ACCESS_DESCRIPTION
)
*
AUTHORITY_INFO_ACCESS_new
()
...
...
crypto/x509v3/v3_pku.c
浏览文件 @
51ca375e
...
...
@@ -121,7 +121,7 @@ void PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *a)
if
(
a
==
NULL
)
return
;
M_ASN1_GENERALIZEDTIME_free
(
a
->
notBefore
);
M_ASN1_GENERALIZEDTIME_free
(
a
->
notAfter
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
static
int
i2r_PKEY_USAGE_PERIOD
(
X509V3_EXT_METHOD
*
method
,
...
...
crypto/x509v3/v3_utl.c
浏览文件 @
51ca375e
...
...
@@ -104,7 +104,7 @@ void X509V3_conf_free(CONF_VALUE *conf)
if
(
conf
->
name
)
Free
(
conf
->
name
);
if
(
conf
->
value
)
Free
(
conf
->
value
);
if
(
conf
->
section
)
Free
(
conf
->
section
);
Free
(
(
char
*
)
conf
);
Free
(
conf
);
}
int
X509V3_add_value_bool
(
const
char
*
name
,
int
asn1_bool
,
...
...
ssl/ssl_lib.c
浏览文件 @
51ca375e
...
...
@@ -380,7 +380,7 @@ void SSL_free(SSL *s)
if
(
s
->
method
!=
NULL
)
s
->
method
->
ssl_free
(
s
);
Free
(
(
char
*
)
s
);
Free
(
s
);
}
void
SSL_set_bio
(
SSL
*
s
,
BIO
*
rbio
,
BIO
*
wbio
)
...
...
@@ -1215,7 +1215,7 @@ void SSL_CTX_free(SSL_CTX *a)
sk_X509_pop_free
(
a
->
extra_certs
,
X509_free
);
if
(
a
->
comp_methods
!=
NULL
)
sk_SSL_COMP_pop_free
(
a
->
comp_methods
,
SSL_COMP_free
);
Free
(
(
char
*
)
a
);
Free
(
a
);
}
void
SSL_CTX_set_default_passwd_cb
(
SSL_CTX
*
ctx
,
pem_password_cb
*
cb
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录