- Timestamp:
- Sep 25, 2011, 9:25:50 PM (11 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, msva, proxy-ticket, upstream
- Children:
- cf10d49
- Parents:
- fb26be5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
rfb26be5 rd0be765 643 643 static mgs_handle_t *create_gnutls_handle(apr_pool_t * pool, conn_rec * c) { 644 644 mgs_handle_t *ctxt; 645 mgs_srvconf_rec *sc = 646 (mgs_srvconf_rec *) ap_get_module_config(c->base_server-> 647 module_config, 648 &gnutls_module); 645 /* Get mod_gnutls Configuration Record */ 646 mgs_srvconf_rec *sc =(mgs_srvconf_rec *) 647 ap_get_module_config(c->base_server->module_config,&gnutls_module); 649 648 650 649 _gnutls_log(debug_log_fp, "%s: %d\n", __func__, __LINE__); … … 653 652 ctxt->sc = sc; 654 653 ctxt->status = 0; 655 656 654 ctxt->input_rc = APR_SUCCESS; 657 655 ctxt->input_bb = apr_brigade_create(c->pool, c->bucket_alloc); 658 656 ctxt->input_cbuf.length = 0; 659 660 657 ctxt->output_rc = APR_SUCCESS; 661 658 ctxt->output_bb = apr_brigade_create(c->pool, c->bucket_alloc); 662 659 ctxt->output_blen = 0; 663 660 ctxt->output_length = 0; 664 661 /* Initialize GnuTLS Library */ 665 662 gnutls_init(&ctxt->session, GNUTLS_SERVER); 666 if (session_ticket_key.data != NULL && ctxt->sc->tickets != 0) 667 gnutls_session_ticket_enable_server(ctxt->session, 668 &session_ticket_key); 669 670 /* because we don't set any default priorities here (we set later at 671 * the user hello callback) we need to at least set this in order for 672 * gnutls to be able to read packets. 673 */ 663 /* Initialize Session Tickets */ 664 if (session_ticket_key.data != NULL && ctxt->sc->tickets != 0) { 665 gnutls_session_ticket_enable_server(ctxt->session,&session_ticket_key); 666 } 667 668 /* Set Default Priority */ 674 669 gnutls_set_default_priority(ctxt->session); 675 670 /* Set Handshake function */ 676 671 gnutls_handshake_set_post_client_hello_function(ctxt->session, 677 672 mgs_select_virtual_server_cb); 678 673 /* Initialize Session Cache */ 679 674 mgs_cache_session_init(ctxt); 680 675 /* Return GnuTLS Handle */ 681 676 return ctxt; 682 677 }
Note: See TracChangeset
for help on using the changeset viewer.