Changeset 31645b2 in mod_gnutls for src/gnutls_io.c
- Timestamp:
- Apr 21, 2005, 1:15:56 PM (18 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, main, master, msva, proxy-ticket, upstream
- Children:
- e924ddd
- Parents:
- 0475f1bc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_io.c
r0475f1bc r31645b2 354 354 } 355 355 356 357 static void gnutls_do_handshake(mod_gnutls_handle_t * ctxt) 356 static int gnutls_do_handshake(mod_gnutls_handle_t * ctxt) 358 357 { 359 358 int ret; 360 359 int errcode; 361 360 if (ctxt->status != 0) { 362 return ;361 return 0; 363 362 } 364 363 … … 389 388 gnutls_error_to_alert(ret, NULL)); 390 389 gnutls_deinit(ctxt->session); 391 return ;390 return ret; 392 391 } 393 392 else { 393 /* all done with the handshake */ 394 394 ctxt->status = 1; 395 return; /* all done with the handshake */ 395 return ret; 396 } 397 } 398 399 int mod_gnutls_rehandshake(mod_gnutls_handle_t * ctxt) 400 { 401 int rv; 402 403 rv = gnutls_rehandshake(ctxt->session); 404 405 if (rv != 0) { 406 /* the client did not want to rehandshake. goodbye */ 407 ap_log_error(APLOG_MARK, APLOG_ERR, 0, ctxt->c->base_server, 408 "GnuTLS: Client Refused Rehandshake request."); 409 return -1; 410 } 411 412 ctxt->status = 0; 413 414 gnutls_do_handshake(ctxt); 415 416 if (ctxt->status == 1) { 417 return 0; 418 } 419 else { 420 return -1; 396 421 } 397 422 } … … 415 440 416 441 if (ctxt->status == 0) { 417 char* server_name;418 int server_type;419 int data_len = 256;420 421 442 gnutls_do_handshake(ctxt); 422 423 /**424 * Due to issues inside the GnuTLS API, we cannot currently do TLS 1.1425 * Server Name Indication.426 */427 server_name = apr_palloc(ctxt->c->pool, data_len);428 if (gnutls_server_name_get(ctxt->session, server_name, &data_len, &server_type, 0) == 0) {429 if (server_type == GNUTLS_NAME_DNS) {430 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,431 ctxt->c->base_server,432 "GnuTLS: TLS 1.1 Server Name: "433 "%s", server_name);434 435 }436 }437 443 } 438 444
Note: See TracChangeset
for help on using the changeset viewer.