Changeset 73f6f12 in mod_gnutls


Ignore:
Timestamp:
Apr 16, 2015, 6:46:36 AM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
2cde026d
Parents:
f030883
Message:

Check handshake result before logging "TLS connection opened"

Without these checks the "TLS connection opened" message is logged even
after a failed handshake, which is confusing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_io.c

    rf030883 r73f6f12  
    458458            }
    459459        }
    460         return 0;
     460        return GNUTLS_E_SUCCESS;
    461461    }
    462462}
     
    505505
    506506    if (ctxt->status == 0) {
    507         gnutls_do_handshake(ctxt);
    508         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c,
    509                       "%s: TLS %sconnection opened.",
    510                       __func__, IS_PROXY_STR(ctxt));
     507        int ret = gnutls_do_handshake(ctxt);
     508        if (ret == GNUTLS_E_SUCCESS)
     509            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c,
     510                          "%s: TLS %sconnection opened.",
     511                          __func__, IS_PROXY_STR(ctxt));
    511512    }
    512513
     
    606607
    607608    if (ctxt->status == 0) {
    608         gnutls_do_handshake(ctxt);
    609         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c,
    610                       "%s: TLS %sconnection opened.",
    611                       __func__, IS_PROXY_STR(ctxt));
     609        ret = gnutls_do_handshake(ctxt);
     610        if (ret == GNUTLS_E_SUCCESS)
     611            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c,
     612                          "%s: TLS %sconnection opened.",
     613                          __func__, IS_PROXY_STR(ctxt));
    612614    }
    613615
Note: See TracChangeset for help on using the changeset viewer.