提交 83c1ab58 编写于 作者: D Daniel P. Berrange

Report what TLS priority string we use for a session

Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 7310739d
...@@ -1187,6 +1187,7 @@ virNetTLSSessionPtr virNetTLSSessionNew(virNetTLSContextPtr ctxt, ...@@ -1187,6 +1187,7 @@ virNetTLSSessionPtr virNetTLSSessionNew(virNetTLSContextPtr ctxt,
{ {
virNetTLSSessionPtr sess; virNetTLSSessionPtr sess;
int err; int err;
const char *priority;
VIR_DEBUG("ctxt=%p hostname=%s isServer=%d", VIR_DEBUG("ctxt=%p hostname=%s isServer=%d",
ctxt, NULLSTR(hostname), ctxt->isServer); ctxt, NULLSTR(hostname), ctxt->isServer);
...@@ -1208,12 +1209,14 @@ virNetTLSSessionPtr virNetTLSSessionNew(virNetTLSContextPtr ctxt, ...@@ -1208,12 +1209,14 @@ virNetTLSSessionPtr virNetTLSSessionNew(virNetTLSContextPtr ctxt,
/* avoid calling all the priority functions, since the defaults /* avoid calling all the priority functions, since the defaults
* are adequate. * are adequate.
*/ */
priority = ctxt->priority ? ctxt->priority : TLS_PRIORITY;
VIR_DEBUG("Setting priority string '%s'", priority);
if ((err = gnutls_priority_set_direct(sess->session, if ((err = gnutls_priority_set_direct(sess->session,
ctxt->priority ? ctxt->priority : TLS_PRIORITY, priority,
NULL)) != 0) { NULL)) != 0) {
virReportError(VIR_ERR_SYSTEM_ERROR, virReportError(VIR_ERR_SYSTEM_ERROR,
_("Failed to set TLS session priority to %s: %s"), _("Failed to set TLS session priority to %s: %s"),
ctxt->priority ? ctxt->priority : TLS_PRIORITY, gnutls_strerror(err)); priority, gnutls_strerror(err));
goto error; goto error;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册