Changeset b4739cd in mod_gnutls
- Timestamp:
- Dec 3, 2013, 4:28:42 PM (9 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, proxy-ticket, upstream
- Children:
- 9717fe4
- Parents:
- 37b52ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
r37b52ea rb4739cd 21 21 #include "http_vhost.h" 22 22 #include "ap_mpm.h" 23 #include "mod_status.h" 23 24 24 25 #ifdef ENABLE_MSVA … … 41 42 static void mgs_add_common_pgpcert_vars(request_rec * r, gnutls_openpgp_crt_t cert, int side, int export_full_cert); 42 43 static const char* mgs_x509_construct_uid(request_rec * pool, gnutls_x509_crt_t cert); 44 static int mgs_status_hook(request_rec *r, int flags); 43 45 44 46 /* Pool Cleanup Function */ … … 109 111 return DONE; 110 112 } 113 114 AP_OPTIONAL_HOOK(status_hook, mgs_status_hook, NULL, NULL, APR_HOOK_MIDDLE); 111 115 112 116 /* Register a pool clean-up function */ … … 1508 1512 return ret; 1509 1513 } 1514 1515 static int mgs_status_hook(request_rec *r, int flags) 1516 { 1517 mgs_srvconf_rec *sc; 1518 1519 if (r == NULL) 1520 return OK; 1521 1522 sc = (mgs_srvconf_rec *) ap_get_module_config(r->server->module_config, &gnutls_module); 1523 1524 _gnutls_log(debug_log_fp, "%s: %d\n", __func__, __LINE__); 1525 1526 ap_rputs("<hr>\n", r); 1527 ap_rputs("<h2>GnuTLS Information:</h2>\n<dl>\n", r); 1528 1529 ap_rprintf(r, "<dt>GnuTLS version:</dt><dd>%s</dd>\n", gnutls_check_version(NULL)); 1530 ap_rputs("<dt>Built against:</dt><dd>" GNUTLS_VERSION "</dd>\n", r); 1531 ap_rprintf(r, "<dt>using TLS:</dt><dd>%s</dd>\n", (sc->enabled == GNUTLS_ENABLED_FALSE ? "no" : "yes")); 1532 if (sc->enabled != GNUTLS_ENABLED_FALSE) { 1533 mgs_handle_t* ctxt; 1534 char* z = NULL; 1535 ctxt = ap_get_module_config(r->connection->conn_config, &gnutls_module); 1536 if (ctxt && ctxt->session != NULL) { 1537 z = gnutls_session_get_desc(ctxt->session); 1538 if (z) { 1539 ap_rprintf(r, "<dt>This TLS Session:</dt><dd>%s</dd>\n", z); 1540 gnutls_free(z); 1541 } 1542 } 1543 } 1544 1545 ap_rputs("</dl>\n", r); 1546 return OK; 1547 } 1548
Note: See TracChangeset
for help on using the changeset viewer.