| 142 | } |
| 143 | |
| 144 | int Session::read(InputBuffer& input, uint8_t*& output) |
| 145 | { |
| 146 | if(!connection) { |
| 147 | debug_w("SSL: no connection"); |
| 148 | return -1; |
| 149 | } |
| 150 | int len = connection->read(input, output); |
| 151 | if(len < 0) { |
| 152 | debug_w("SSL: Got error: %d (%s)", len, connection->getErrorString(len).c_str()); |
| 153 | auto alert = connection->getAlert(len); |
| 154 | if(alert == Alert::CERTIFICATE_UNKNOWN) { |
| 155 | debug_w("SSL: Client didn't like certificate, continue anyway"); |
| 156 | len = ERR_OK; |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | return len; |
| 161 | } |
| 162 | |
| 163 | int Session::write(const uint8_t* data, size_t length) |
| 164 | { |
no test coverage detected