[PATCH] Remove call to deprecated gnutls_certificate_type_set_priority (again)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

The gnutls_certificate_type_set_priority method is deprecated.
Since we already set the default gnutls priority, it was not
serving any useful purpose and can be removed

* src/rpc/virnettlscontext.c: Remove gnutls_certificate_type_set_priority
  call
---
 src/rpc/virnettlscontext.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
index 9279ded..ae16dbb 100644
--- a/src/rpc/virnettlscontext.c
+++ b/src/rpc/virnettlscontext.c
@@ -1115,7 +1115,6 @@ virNetTLSSessionPtr virNetTLSSessionNew(virNetTLSContextPtr ctxt,
 {
     virNetTLSSessionPtr sess;
     int err;
-    static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 };
 
     VIR_DEBUG("ctxt=%p hostname=%s isServer=%d", ctxt, NULLSTR(hostname), ctxt->isServer);
 
@@ -1142,9 +1141,7 @@ virNetTLSSessionPtr virNetTLSSessionNew(virNetTLSContextPtr ctxt,
     /* avoid calling all the priority functions, since the defaults
      * are adequate.
      */
-    if ((err = gnutls_set_default_priority(sess->session)) != 0 ||
-        (err = gnutls_certificate_type_set_priority(sess->session,
-                                                    cert_type_priority))) {
+    if ((err = gnutls_set_default_priority(sess->session)) != 0) {
         virNetError(VIR_ERR_SYSTEM_ERROR,
                     _("Failed to set TLS session priority %s"),
                     gnutls_strerror(err));
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]