void pni_process_init(pn_transport_t *transport, const char *mechanism, const pn_bytes_t *recv) { pni_sasl_t *sasl = transport->sasl; int result = pni_wrap_server_start(sasl, mechanism, recv); if (result==SASL_OK) { // We need to filter out a supplied mech in in the inclusion list // as the client could have used a mech that we support, but that // wasn't on the list we sent. if (!pni_included_mech(sasl->included_mechanisms, pn_bytes(strlen(mechanism), mechanism))) { sasl_conn_t *cyrus_conn = (sasl_conn_t*)sasl->impl_context; sasl_seterror(cyrus_conn, 0, "Client mechanism not in mechanism inclusion list."); result = SASL_FAIL; } } pni_process_server_result(transport, result); }
void pni_process_response(pn_transport_t *transport, const pn_bytes_t *recv) { pni_sasl_t *sasl = transport->sasl; int result = pni_wrap_server_step(sasl, recv); pni_process_server_result(transport, result); }