diff options
author | Pierre Ossman <ossman@cendio.se> | 2019-12-30 10:24:11 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2019-12-30 10:24:11 +0100 |
commit | dbad687182ae9093efaf096a069eeafc18b22973 (patch) | |
tree | b8eeb1019eec0d8c167d48b3e17e11b64a2d212f | |
parent | 5e4957a3d4d8156484570e7a935e21fce1d42711 (diff) | |
download | tigervnc-dbad687182ae9093efaf096a069eeafc18b22973.tar.gz tigervnc-dbad687182ae9093efaf096a069eeafc18b22973.zip |
Fix saving of bad server certificates
This check is completely backwards and it is currently unknown how
this ever worked.
-rw-r--r-- | common/rfb/CSecurityTLS.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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]; |