(CConnection cc)
| 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 |
nothing calls this directly
no test coverage detected