}
}
- err = canl_io_connect(my_ctx, my_io_h, p_server, NULL, port, NULL, 0, &timeout);
+ err = canl_io_connect(my_ctx, my_io_h, p_server, NULL, port, NULL, 0,
+ NULL, &timeout);
if (err) {
printf("[CLIENT] connection to %s cannot be established: %s\n",
p_server, canl_get_error_message(my_ctx));
canl_err_code
canl_io_connect(canl_ctx cc, canl_io_handler io, const char *host,
const char *service, int port, gss_OID_set auth_mechs,
- int flags, struct timeval *timeout)
+ int flags, canl_principal *peer, struct timeval *timeout)
{
int err = 0;
io_handler *io_cc = (io_handler*) io;
continue;
}
- err = mech->connect(glb_cc, io_cc, ctx, timeout, host); //TODO timeout
+ err = mech->connect(glb_cc, io_cc, ctx, timeout, host);
if (err) {
canl_io_close(glb_cc, io_cc);
mech->free_ctx(glb_cc, ctx);
ctx = NULL;
- continue;
- }
- io_cc->conn_ctx = ctx;
- done = 1;
- break;
+ continue;
+ }
+ io_cc->conn_ctx = ctx;
+ done = 1;
+ /*TODO Not mandatory peer certificate for now*/
+ /* if (peer) {
+ err = mech->get_peer(glb_cc, io_cc, conn_ctx, peer);
+ if (err)
+ goto end;
+ }
+ */
+ break;
}
if (err == ETIMEDOUT)
goto end;