- Timestamp:
- Oct 1, 2008, 11:50:40 AM (14 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, msva, proxy-ticket, upstream
- Children:
- a208cd3
- Parents:
- 4fb2b3c
- git-author:
- Nikos Mavrogiannopoulos <nmav@…> (10/01/08 11:50:40)
- git-committer:
- Nokis Mavrogiannopoulos <nmav@…> (10/01/08 11:50:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
r4fb2b3c r26b08fd 63 63 int ret; 64 64 65 #if MOD_GNUTLS_DEBUG 66 apr_file_open(&debug_log_fp, "/tmp/gnutls_debug", 67 APR_APPEND | APR_WRITE | APR_CREATE, APR_OS_DEFAULT, 68 pconf); 69 70 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 71 72 gnutls_global_set_log_level(9); 73 gnutls_global_set_log_function(gnutls_debug_log_all); 74 apr_file_printf(debug_log_fp, "gnutls: %s\n", gnutls_check_version(NULL)); 75 #endif 76 65 77 #if APR_HAS_THREADS 66 78 ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_is_threaded); … … 73 85 74 86 if (gnutls_check_version(LIBGNUTLS_VERSION)==NULL) { 75 fprintf(stderr, "gnutls_check_version() failed. Required: gnutls-%s Found: gnutls-%s\n",87 apr_file_printf(debug_log_fp, "gnutls_check_version() failed. Required: gnutls-%s Found: gnutls-%s\n", 76 88 LIBGNUTLS_VERSION, gnutls_check_version(NULL)); 77 89 return -3; … … 80 92 ret = gnutls_global_init(); 81 93 if (ret < 0) { 82 fprintf(stderr, "gnutls_global_init: %s\n", gnutls_strerror(ret));94 apr_file_printf(debug_log_fp, "gnutls_global_init: %s\n", gnutls_strerror(ret)); 83 95 return -3; 84 96 } … … 87 99 apr_pool_cleanup_null); 88 100 89 #if MOD_GNUTLS_DEBUG90 apr_file_open(&debug_log_fp, "/tmp/gnutls_debug",91 APR_APPEND | APR_WRITE | APR_CREATE, APR_OS_DEFAULT,92 pconf);93 94 gnutls_global_set_log_level(9);95 gnutls_global_set_log_function(gnutls_debug_log_all);96 apr_file_printf(debug_log_fp, "gnutls: %s\n", gnutls_check_version(NULL));97 #endif98 101 99 102 return OK; … … 106 109 int ret; 107 110 int cprio[2]; 111 112 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 108 113 109 114 ctxt = gnutls_transport_get_ptr(session); … … 163 168 mgs_handle_t *ctxt; 164 169 170 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 165 171 ctxt = gnutls_transport_get_ptr(session); 166 172 … … 214 220 215 221 222 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 216 223 *cert_cn = NULL; 217 224 … … 265 272 266 273 274 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 267 275 *cert_cn = NULL; 268 276 … … 297 305 const char *userdata_key = "mgs_init"; 298 306 307 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 299 308 apr_pool_userdata_get(&data, userdata_key, base_server->process->pool); 300 309 if (data == NULL) { … … 443 452 &gnutls_module); 444 453 454 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 445 455 if (sc->cache_type != mgs_cache_none) { 446 456 rv = mgs_cache_child_init(p, s, sc); … … 461 471 &gnutls_module); 462 472 473 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 463 474 if (sc->enabled == GNUTLS_ENABLED_FALSE) { 464 475 return NULL; … … 474 485 &gnutls_module); 475 486 487 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 476 488 if (sc->enabled == GNUTLS_ENABLED_FALSE) { 477 489 return 0; … … 495 507 vhost_cb_rec *x = baton; 496 508 509 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 497 510 tsc = (mgs_srvconf_rec *) ap_get_module_config(s->module_config, 498 511 &gnutls_module); … … 547 560 #endif 548 561 562 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 549 563 ctxt = gnutls_transport_get_ptr(session); 550 564 … … 624 638 &gnutls_module); 625 639 640 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 626 641 ctxt = apr_pcalloc(pool, sizeof(*ctxt)); 627 642 ctxt->c = c; … … 662 677 &gnutls_module); 663 678 679 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 664 680 if (!(sc && (sc->enabled == GNUTLS_ENABLED_TRUE))) { 665 681 return DECLINED; … … 691 707 int rv = OK; 692 708 709 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 693 710 apr_table_t *env = r->subprocess_env; 694 711 … … 765 782 &gnutls_module); 766 783 784 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 767 785 ctxt = 768 786 ap_get_module_config(r->connection->conn_config, &gnutls_module); … … 826 844 apr_table_t *env = r->subprocess_env; 827 845 846 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 828 847 if (export_certificates_enabled != 0) { 829 848 char cert_buf[10 * 1024]; … … 932 951 int ret; 933 952 953 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 934 954 apr_table_t *env = r->subprocess_env; 935 955 … … 998 1018 apr_time_t activation_time, expiration_time, cur_time; 999 1019 1020 apr_file_printf(debug_log_fp, "%s: %d\n", __func__, __LINE__); 1000 1021 cert_list = 1001 1022 gnutls_certificate_get_peers(ctxt->session, &cert_list_size);
Note: See TracChangeset
for help on using the changeset viewer.