瀏覽代碼

Don't read invalid TLS auth reason

The specification only states a single result byte and not any reason
after a TLS authentication failure.
tags/v1.11.90
Pierre Ossman 4 年之前
父節點
當前提交
5f09e7c662
共有 1 個檔案被更改,包括 2 行新增9 行删除
  1. 2
    9
      common/rfb/CSecurityTLS.cxx

+ 2
- 9
common/rfb/CSecurityTLS.cxx 查看文件

@@ -157,15 +157,8 @@ bool CSecurityTLS::processMsg()
if (!is->checkNoWait(1))
return false;

if (is->readU8() == 0) {
rdr::U32 result = is->readU32();
CharArray reason;
if (result == secResultFailed || result == secResultTooMany)
reason.buf = is->readString();
else
reason.buf = strDup("protocol error");
throw AuthFailureException(reason.buf);
}
if (is->readU8() == 0)
throw AuthFailureException("Server failed to initialize TLS session");

if (gnutls_init(&session, GNUTLS_CLIENT) != GNUTLS_E_SUCCESS)
throw AuthFailureException("gnutls_init failed");

Loading…
取消
儲存