Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
cfcf6453
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cfcf6453
编写于
1月 03, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make sure applications free up pkey structures and add netscape extension
handling to x509.c
上级
cdbb8c2f
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
25 addition
and
4 deletion
+25
-4
CHANGES
CHANGES
+4
-0
apps/req.c
apps/req.c
+4
-1
apps/x509.c
apps/x509.c
+4
-0
crypto/asn1/t_req.c
crypto/asn1/t_req.c
+2
-0
crypto/asn1/t_x509.c
crypto/asn1/t_x509.c
+2
-0
crypto/x509/x509_vfy.c
crypto/x509/x509_vfy.c
+7
-2
crypto/x509/x509type.c
crypto/x509/x509type.c
+2
-1
未找到文件。
CHANGES
浏览文件 @
cfcf6453
...
...
@@ -5,6 +5,10 @@
Changes between 0.9.1c and 0.9.2
*) Fix the various library and apps files to free up pkeys obtained from
EVP_PUBKEY_get() et al. Also allow x509.c to handle netscape extensions.
[Steve Henson]
*) Fix reference counting in X509_PUBKEY_get(). This makes
demos/maurice/example2.c work, amongst others, probably.
[Steve Henson and Ben Laurie]
...
...
apps/req.c
浏览文件 @
cfcf6453
...
...
@@ -663,7 +663,10 @@ loop:
}
i
=
X509_REQ_verify
(
req
,
pkey
);
if
(
tmp
)
pkey
=
NULL
;
if
(
tmp
)
{
EVP_PKEY_free
(
pkey
);
pkey
=
NULL
;
}
if
(
i
<
0
)
{
...
...
apps/x509.c
浏览文件 @
cfcf6453
...
...
@@ -305,6 +305,7 @@ bad:
}
ERR_load_crypto_strings
();
X509v3_add_netscape_extensions
();
if
(
!
X509_STORE_set_default_paths
(
ctx
))
{
...
...
@@ -368,6 +369,7 @@ bad:
goto
end
;
}
i
=
X509_REQ_verify
(
req
,
pkey
);
EVP_PKEY_free
(
pkey
);
if
(
i
<
0
)
{
BIO_printf
(
bio_err
,
"Signature verification error
\n
"
);
...
...
@@ -481,6 +483,7 @@ bad:
else
BIO_printf
(
STDout
,
"Wrong Algorithm type"
);
BIO_printf
(
STDout
,
"
\n
"
);
EVP_PKEY_free
(
pkey
);
}
else
#endif
...
...
@@ -688,6 +691,7 @@ end:
if
(
Upkey
!=
NULL
)
EVP_PKEY_free
(
Upkey
);
if
(
CApkey
!=
NULL
)
EVP_PKEY_free
(
CApkey
);
if
(
rq
!=
NULL
)
X509_REQ_free
(
rq
);
X509v3_cleanup_extensions
();
EXIT
(
ret
);
}
...
...
crypto/asn1/t_req.c
浏览文件 @
cfcf6453
...
...
@@ -138,6 +138,8 @@ X509_REQ *x;
#endif
BIO_printf
(
bp
,
"%12sUnknown Public Key:
\n
"
,
""
);
EVP_PKEY_free
(
pkey
);
/* may not be */
sprintf
(
str
,
"%8sAttributes:
\n
"
,
""
);
if
(
BIO_puts
(
bp
,
str
)
<=
0
)
goto
err
;
...
...
crypto/asn1/t_x509.c
浏览文件 @
cfcf6453
...
...
@@ -182,6 +182,8 @@ X509 *x;
#endif
BIO_printf
(
bp
,
"%12sUnknown Public Key:
\n
"
,
""
);
EVP_PKEY_free
(
pkey
);
n
=
X509_get_ext_count
(
x
);
if
(
n
>
0
)
{
...
...
crypto/x509/x509_vfy.c
浏览文件 @
cfcf6453
...
...
@@ -345,11 +345,13 @@ X509_STORE_CTX *ctx;
}
if
(
X509_verify
(
xs
,
pkey
)
<=
0
)
{
EVP_PKEY_free
(
pkey
);
ctx
->
error
=
X509_V_ERR_CERT_SIGNATURE_FAILURE
;
ctx
->
current_cert
=
xs
;
ok
=
(
*
cb
)(
0
,
ctx
);
if
(
!
ok
)
goto
end
;
}
EVP_PKEY_free
(
pkey
);
pkey
=
NULL
;
i
=
X509_cmp_current_time
(
X509_get_notBefore
(
xs
));
...
...
@@ -403,6 +405,7 @@ X509_STORE_CTX *ctx;
}
ok
=
1
;
end:
EVP_PKEY_free
(
pkey
);
return
(
ok
);
}
...
...
@@ -492,6 +495,7 @@ STACK *chain;
break
;
else
{
EVP_PKEY_free
(
ktmp
);
ktmp
=
NULL
;
}
}
...
...
@@ -506,10 +510,11 @@ STACK *chain;
{
ktmp2
=
X509_get_pubkey
((
X509
*
)
sk_value
(
chain
,
j
));
EVP_PKEY_copy_parameters
(
ktmp2
,
ktmp
);
EVP_PKEY_free
(
ktmp2
);
}
if
(
pkey
!=
NULL
)
EVP_PKEY_copy_parameters
(
pkey
,
ktmp
);
if
(
pkey
!=
NULL
)
EVP_PKEY_copy_parameters
(
pkey
,
ktmp
);
EVP_PKEY_free
(
ktmp
);
return
(
1
);
}
...
...
crypto/x509/x509type.c
浏览文件 @
cfcf6453
...
...
@@ -108,8 +108,9 @@ EVP_PKEY *pkey;
break
;
}
if
(
EVP_PKEY_size
(
pk
ey
)
<=
512
)
if
(
EVP_PKEY_size
(
pk
)
<=
512
)
ret
|=
EVP_PKT_EXP
;
if
(
pkey
==
NULL
)
EVP_PKEY_free
(
pk
);
return
(
ret
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录