From: Tyson Whitehead Date: Fri, 1 Oct 2021 22:35:19 +0000 (-0400) Subject: System certificate load returns number loaded not GNUTLS_E_SUCCESS X-Git-Tag: v1.12.0~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d2776288f9717c03bba0bc73d5f19011d7cbb722;p=tigervnc.git System certificate load returns number loaded not GNUTLS_E_SUCCESS (cherry picked from commit d32ff1c9600f7f19f5fe391ed6c71cc117ab1521) --- diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index df4b37b5..be70c559 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -284,7 +284,7 @@ void CSecurityTLS::setParam() if (gnutls_certificate_allocate_credentials(&cert_cred) != GNUTLS_E_SUCCESS) throw AuthFailureException("gnutls_certificate_allocate_credentials failed"); - if (gnutls_certificate_set_x509_system_trust(cert_cred) != GNUTLS_E_SUCCESS) + if (gnutls_certificate_set_x509_system_trust(cert_cred) < 1) vlog.error("Could not load system certificate trust store"); if (*cafile && gnutls_certificate_set_x509_trust_file(cert_cred,cafile,GNUTLS_X509_FMT_PEM) < 0)