Changeset d0be765 in mod_gnutls for src


Ignore:
Timestamp:
Sep 25, 2011, 9:25:50 PM (8 years ago)
Author:
Dash Shendy <neuromancer@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
cf10d49
Parents:
fb26be5
Message:

Added some comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    rfb26be5 rd0be765  
    643643static mgs_handle_t *create_gnutls_handle(apr_pool_t * pool, conn_rec * c) {
    644644    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);
    649648
    650649    _gnutls_log(debug_log_fp, "%s: %d\n", __func__, __LINE__);
     
    653652    ctxt->sc = sc;
    654653    ctxt->status = 0;
    655 
    656654    ctxt->input_rc = APR_SUCCESS;
    657655    ctxt->input_bb = apr_brigade_create(c->pool, c->bucket_alloc);
    658656    ctxt->input_cbuf.length = 0;
    659 
    660657    ctxt->output_rc = APR_SUCCESS;
    661658    ctxt->output_bb = apr_brigade_create(c->pool, c->bucket_alloc);
    662659    ctxt->output_blen = 0;
    663660    ctxt->output_length = 0;
    664 
     661    /* Initialize GnuTLS Library */
    665662    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 */
    674669    gnutls_set_default_priority(ctxt->session);
    675 
     670    /* Set Handshake function */
    676671    gnutls_handshake_set_post_client_hello_function(ctxt->session,
    677672            mgs_select_virtual_server_cb);
    678 
     673    /* Initialize Session Cache */
    679674    mgs_cache_session_init(ctxt);
    680 
     675    /* Return GnuTLS Handle */
    681676    return ctxt;
    682677}
Note: See TracChangeset for help on using the changeset viewer.