Mercurial > hg > freeDiameter
comparison freeDiameter/sctps.c @ 31:26685c67d387
Completed the test and fixed a couple issues
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 28 Oct 2009 18:51:45 +0900 |
parents | 5ba91682f0bc |
children | 067ab3fc6093 |
comparison
equal
deleted
inserted
replaced
30:bca243c65b56 | 31:26685c67d387 |
---|---|
428 | 428 |
429 /* The handshake is made in parallel in several threads to speed up */ | 429 /* The handshake is made in parallel in several threads to speed up */ |
430 static void * handshake_resume_th(void * arg) | 430 static void * handshake_resume_th(void * arg) |
431 { | 431 { |
432 struct sctps_ctx * ctx = (struct sctps_ctx *) arg; | 432 struct sctps_ctx * ctx = (struct sctps_ctx *) arg; |
433 int resumed; | |
434 | |
433 TRACE_ENTRY("%p", arg); | 435 TRACE_ENTRY("%p", arg); |
434 | 436 |
435 /* Set the thread name */ | 437 /* Set the thread name */ |
436 { | 438 { |
437 char buf[48]; | 439 char buf[48]; |
440 } | 442 } |
441 | 443 |
442 TRACE_DEBUG(FULL, "Starting TLS resumed handshake on stream %hu", ctx->strid); | 444 TRACE_DEBUG(FULL, "Starting TLS resumed handshake on stream %hu", ctx->strid); |
443 CHECK_GNUTLS_DO( gnutls_handshake( ctx->session ), return NULL); | 445 CHECK_GNUTLS_DO( gnutls_handshake( ctx->session ), return NULL); |
444 | 446 |
447 resumed = gnutls_session_is_resumed(ctx->session); | |
448 if (!resumed) { | |
449 /* Check the credentials here also */ | |
450 CHECK_FCT_DO( fd_tls_verify_credentials(ctx->session, ctx->parent), return NULL ); | |
451 } | |
445 if (TRACE_BOOL(FULL)) { | 452 if (TRACE_BOOL(FULL)) { |
446 int resumed = gnutls_session_is_resumed(ctx->session); | |
447 if (resumed) { | 453 if (resumed) { |
448 fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent)); | 454 fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent)); |
449 } else { | 455 } else { |
450 fd_log_debug("Session was NOT resumed (full handshake) on stream %hu (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent)); | 456 fd_log_debug("Session was NOT resumed on stream %hu (full handshake + verif) (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent)); |
451 } | 457 } |
452 } | 458 } |
453 | 459 |
454 /* Finish */ | 460 /* Finished, OK */ |
455 return arg; | 461 return arg; |
456 } | 462 } |
457 | 463 |
458 | 464 |
459 /*************************************************************/ | 465 /*************************************************************/ |