| 7842 | |
| 7843 | |
| 7844 | static void secureAuthentication(ClntAuthBlock& cBlock, rem_port* port) |
| 7845 | { |
| 7846 | HANDSHAKE_DEBUG(fprintf(stderr, "Cli: secureAuthentication\n")); |
| 7847 | |
| 7848 | if (!port) |
| 7849 | return; |
| 7850 | |
| 7851 | Rdb* rdb = port->port_context; |
| 7852 | fb_assert(rdb); |
| 7853 | PACKET* packet = &rdb->rdb_packet; |
| 7854 | |
| 7855 | HANDSHAKE_DEBUG(fprintf(stderr, "Cli: secureAuthentication: port OK, op=%d\n", packet->p_operation)); |
| 7856 | |
| 7857 | if (packet->p_operation == op_cond_accept) |
| 7858 | { |
| 7859 | LocalStatus ls; |
| 7860 | CheckStatusWrapper st(&ls); |
| 7861 | authReceiveResponse(true, cBlock, port, rdb, &st, packet, true); |
| 7862 | |
| 7863 | if (st.getState() & IStatus::STATE_ERRORS) |
| 7864 | status_exception::raise(&st); |
| 7865 | } |
| 7866 | else |
| 7867 | { |
| 7868 | // try to start crypt |
| 7869 | cBlock.tryNewKeys(port); |
| 7870 | } |
| 7871 | } |
| 7872 | |
| 7873 | |
| 7874 | static rem_port* analyze(ClntAuthBlock& cBlock, PathName& attach_name, unsigned flags, |
no test coverage detected