MCPcopy Create free account
hub / github.com/TigerVNC/tigervnc / processMsg

Method processMsg

java/com/tigervnc/rfb/CSecurityTLS.java:109–144  ·  view source on GitHub ↗
(CConnection cc)

Source from the content-addressed store, hash-verified

107 }
108
109 public boolean processMsg(CConnection cc) {
110 is = (FdInStream)cc.getInStream();
111 os = (FdOutStream)cc.getOutStream();
112 client = cc;
113
114 initGlobal();
115
116 if (manager == null) {
117 if (!is.checkNoWait(1))
118 return false;
119
120 if (is.readU8() == 0) {
121 int result = is.readU32();
122 String reason;
123 if (result == Security.secResultFailed ||
124 result == Security.secResultTooMany)
125 reason = is.readString();
126 else
127 reason = new String("Authentication failure (protocol error)");
128 throw new AuthFailureException(reason);
129 }
130
131 setParam();
132 }
133
134 try {
135 manager = new SSLEngineManager(engine, is, os);
136 manager.doHandshake();
137 } catch(java.lang.Exception e) {
138 throw new SystemException(e.toString());
139 }
140
141 cc.setStreams(new TLSInStream(is, manager),
142 new TLSOutStream(os, manager));
143 return true;
144 }
145
146 private void setParam() {
147

Callers

nothing calls this directly

Calls 11

initGlobalMethod · 0.95
setParamMethod · 0.95
checkNoWaitMethod · 0.80
doHandshakeMethod · 0.80
getInStreamMethod · 0.45
getOutStreamMethod · 0.45
readU8Method · 0.45
readU32Method · 0.45
readStringMethod · 0.45
toStringMethod · 0.45
setStreamsMethod · 0.45

Tested by

no test coverage detected