Changeset e4b58b6 in mod_gnutls for src/gnutls_hooks.c


Ignore:
Timestamp:
Jan 20, 2015, 9:55:03 AM (8 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
asyncio, debian/master, debian/stretch-backports, jessie-backports, main, master, proxy-ticket, upstream
Children:
e8acf05
Parents:
3d361b8
Message:

Check error codes during GnuTLS connection init

These calls shouldn't fail, but better safe than sorry.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    r3d361b8 re4b58b6  
    701701    ctxt->output_length = 0;
    702702    /* Initialize GnuTLS Library */
    703     gnutls_init(&ctxt->session, GNUTLS_SERVER);
     703    int err = gnutls_init(&ctxt->session, GNUTLS_SERVER);
     704    if (err != GNUTLS_E_SUCCESS)
     705        ap_log_cerror(APLOG_MARK, APLOG_ERR, err, c, "gnutls_init failed!");
    704706    /* Initialize Session Tickets */
    705707    if (session_ticket_key.data != NULL && ctxt->sc->tickets != 0) {
    706         gnutls_session_ticket_enable_server(ctxt->session,&session_ticket_key);
     708        err = gnutls_session_ticket_enable_server(ctxt->session, &session_ticket_key);
     709        if (err != GNUTLS_E_SUCCESS)
     710            ap_log_cerror(APLOG_MARK, APLOG_ERR, err, c, "gnutls_session_ticket_enable_server failed!");
    707711    }
    708712
    709713    /* Set Default Priority */
    710         gnutls_priority_set_direct (ctxt->session, "NORMAL", NULL);
     714        err = gnutls_priority_set_direct(ctxt->session, "NORMAL", NULL);
     715    if (err != GNUTLS_E_SUCCESS)
     716        ap_log_cerror(APLOG_MARK, APLOG_ERR, err, c, "gnutls_priority_set_direct failed!");
    711717    /* Set Handshake function */
    712718    gnutls_handshake_set_post_client_hello_function(ctxt->session,
Note: See TracChangeset for help on using the changeset viewer.