| 175 | } |
| 176 | |
| 177 | void PostgreSQLHandler::establishSecureConnection(Int32 & payload_size, Int32 & info) |
| 178 | { |
| 179 | bool was_encryption_req = true; |
| 180 | readBinaryBigEndian(payload_size, *in); |
| 181 | readBinaryBigEndian(info, *in); |
| 182 | |
| 183 | switch (static_cast<PostgreSQLProtocol::Messaging::FrontMessageType>(info)) |
| 184 | { |
| 185 | case PostgreSQLProtocol::Messaging::FrontMessageType::SSL_REQUEST: |
| 186 | LOG_DEBUG(log, "Client requested SSL"); |
| 187 | if (ssl_enabled) |
| 188 | makeSecureConnectionSSL(); |
| 189 | else |
| 190 | message_transport->send('N', true); |
| 191 | break; |
| 192 | case PostgreSQLProtocol::Messaging::FrontMessageType::GSSENC_REQUEST: |
| 193 | LOG_DEBUG(log, "Client requested GSSENC"); |
| 194 | message_transport->send('N', true); |
| 195 | break; |
| 196 | default: |
| 197 | was_encryption_req = false; |
| 198 | } |
| 199 | if (was_encryption_req) |
| 200 | { |
| 201 | readBinaryBigEndian(payload_size, *in); |
| 202 | readBinaryBigEndian(info, *in); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | #if USE_SSL |
| 207 | void PostgreSQLHandler::makeSecureConnectionSSL() |
nothing calls this directly
no test coverage detected