Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
3ea04325
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3ea04325
编写于
7月 20, 2011
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix mixed up error messages when reporting TLS certificate problems
* src/rpc/virnettlscontext.c: Fix mixed up error messages
上级
4f550a12
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
10 deletion
+10
-10
src/rpc/virnettlscontext.c
src/rpc/virnettlscontext.c
+10
-10
未找到文件。
src/rpc/virnettlscontext.c
浏览文件 @
3ea04325
...
...
@@ -194,7 +194,7 @@ static gnutls_x509_crt_t virNetTLSContextSanityCheckCert(bool isServer,
VIR_DEBUG
(
"Cert %s key usage status %d usage %d"
,
certFile
,
status
,
usage
);
if
(
status
<
0
)
{
virNetError
(
VIR_ERR_SYSTEM_ERROR
,
_
(
"Unable to query certificate %s
basic constraints
%s"
),
_
(
"Unable to query certificate %s
key usage
%s"
),
certFile
,
gnutls_strerror
(
status
));
goto
cleanup
;
}
...
...
@@ -202,8 +202,8 @@ static gnutls_x509_crt_t virNetTLSContextSanityCheckCert(bool isServer,
if
(
usage
&
GNUTLS_KEY_KEY_CERT_SIGN
)
{
if
(
!
isCA
)
{
virNetError
(
VIR_ERR_SYSTEM_ERROR
,
isServer
?
_
(
"Certificate
server usage is for certificate signing, but wanted a %s
certificate"
)
:
_
(
"Certificate
client usage is for certificate signing, but wanted a %s
certificate"
),
_
(
"Certificate
%s usage is for certificate signing, but wanted a server
certificate"
)
:
_
(
"Certificate
%s usage is for certificate signing, but wanted a client
certificate"
),
certFile
);
goto
cleanup
;
}
...
...
@@ -248,25 +248,25 @@ static gnutls_x509_crt_t virNetTLSContextSanityCheckCert(bool isServer,
if
(
STREQ
(
buffer
,
GNUTLS_KP_TLS_WWW_SERVER
))
{
if
(
isCA
||
!
isServer
)
{
virNetError
(
VIR_ERR_SYSTEM_ERROR
,
isCA
?
_
(
"Certificate
CA purpose is TLS server, but wanted a %s
certificate"
)
:
_
(
"Certificate
TLS client purpose is TLS server, but wanted a %s
certificate"
),
_
(
"Certificate
%s purpose is TLS server, but wanted a CA
certificate"
)
:
_
(
"Certificate
%s client purpose is TLS server, but wanted a TLS client
certificate"
),
certFile
);
goto
cleanup
;
}
}
else
if
(
STREQ
(
buffer
,
GNUTLS_KP_TLS_WWW_CLIENT
))
{
if
(
isCA
||
isServer
)
{
virNetError
(
VIR_ERR_SYSTEM_ERROR
,
isCA
?
_
(
"Certificate
CA purpose is TLS client, but wanted a %s
certificate"
)
:
_
(
"Certificate
TLS server purpose is TLS client, but wanted a %s
certificate"
),
_
(
"Certificate
%s purpose is TLS client, but wanted a CA
certificate"
)
:
_
(
"Certificate
%s server purpose is TLS client, but wanted a TLS server
certificate"
),
certFile
);
goto
cleanup
;
}
}
else
if
(
STRNEQ
(
buffer
,
GNUTLS_KP_ANY
))
{
virNetError
(
VIR_ERR_SYSTEM_ERROR
,
(
isCA
?
_
(
"Certificate
CA purpose is wrong, wanted a %s
certificate"
)
:
_
(
"Certificate
%s purpose is wrong, wanted a CA
certificate"
)
:
(
isServer
?
_
(
"Certificate
TLS server purpose is wrong, wanted a %s
certificate"
)
:
_
(
"Certificate
TLS client purpose is wrong, wanted a %s
certificate"
))),
_
(
"Certificate
%s purpose is wrong, wanted a TLS server
certificate"
)
:
_
(
"Certificate
%s purpose is wrong, wanted a TLS client
certificate"
))),
certFile
);
goto
cleanup
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录