From: Pierre Ossman Date: Mon, 30 Dec 2019 09:24:11 +0000 (+0100) Subject: Fix saving of bad server certificates X-Git-Tag: v1.10.90~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dbad687182ae9093efaf096a069eeafc18b22973;p=tigervnc.git Fix saving of bad server certificates This check is completely backwards and it is currently unknown how this ever worked. --- diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index aa191090..c1a00212 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -416,8 +416,9 @@ void CSecurityTLS::checkSession() delete [] certinfo; if (gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, NULL, &out_size) - == GNUTLS_E_SHORT_MEMORY_BUFFER) - throw AuthFailureException("Out of memory"); + != GNUTLS_E_SHORT_MEMORY_BUFFER) + throw AuthFailureException("certificate issuer unknown, and certificate " + "export failed"); // Save cert out_buf = new char[out_size];