Changeset a26d3f6 in mod_gnutls


Ignore:
Timestamp:
Nov 6, 2018, 1:55:59 AM (10 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master
Children:
79fc46b
Parents:
4963516
git-author:
Fiona Klute <fiona.klute@…> (11/06/18 01:53:43)
git-committer:
Fiona Klute <fiona.klute@…> (11/06/18 01:55:59)
Message:

Protect early_sni_hook() against being called in the wrong context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    r4963516 ra26d3f6  
    10161016                          const gnutls_datum_t *msg)
    10171017{
    1018     //assert(htype == GNUTLS_HANDSHAKE_CLIENT_HELLO);
    1019     //assert(when == GNUTLS_HOOK_PRE);
    10201018    if (!incoming)
    10211019        return 0;
    10221020
    10231021    mgs_handle_t *ctxt = (mgs_handle_t *) gnutls_session_get_ptr(session);
     1022
     1023    /* This is a hook for pre client hello ONLY! */
     1024    if (htype != GNUTLS_HANDSHAKE_CLIENT_HELLO || when != GNUTLS_HOOK_PRE)
     1025    {
     1026        ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EINVAL, ctxt->c,
     1027                      "%s called outside pre client hello hook, this "
     1028                      "indicates a programming error!",
     1029                      __func__);
     1030        return GNUTLS_E_SELF_TEST_ERROR;
     1031    }
     1032
    10241033    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c,
    10251034                  "%s: Trying early SNI.",
Note: See TracChangeset for help on using the changeset viewer.