Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Jun 97 14:49:52 -0500
From:      "Richard Seaman, Jr." <lists@tar.com>
To:        "Khetan Gajjar" <khetan@chain.iafrica.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Apache with SSL or shttp
Message-ID:  <199706081949.OAA23580@ns.tar.com>

next in thread | raw e-mail | index | archive | help
You wrote:

>I hand-applied the patches from ftp.ox.ac.uk to 1.2b11, and
>hand-applied the patches from the pkg.SSL (those that differed).
>It compiled great, but when ever I tried to run the httpsd, it would
>sigsegv. 

>Anyone got a *WORKING* port of Apache+SSL, preferably against 1.2
>(seeing that it's just been released) ?

>I'm tired of hand-diffing all these blasted files, having it compile
>and then sigsegv.

There were significant changes to http_main.c between Apache 1.2b10
and 1.2b11 or 1.2 release.  The line 
 
ApacheSSLSetupConnection(current_conn);

gets put in the wrong place by SSLPatch -- current_conn is NULL when
this gets called in the wrong place, which is why you get your sigsegv.

Try this patch (to 1.2 release -- should be the same for 1.2b11), plus
all the other patches in SSLpatch except for those for http_main.c:

*** /usr/ports/www/apache/work/apache_1.2.0/src/http_main.c	Wed May 28 23:50:27 1997
--- http_main.c	Sun Jun  8 14:27:36 1997
***************
*** 1852,1857 ****
--- 1852,1867 ----
           * until no requests are left or we decide to close.
           */
  
+ #ifdef APACHE_SSL                                             
+         /*                                                      
+          * This returns false if the connection cannot be setup,
+          * so maybe we should do something with this here...    
+          * however it also blocks the BUFF connections          
+          * so the next bit should fall out anyway!              
+          */                                                     
+         ApacheSSLSetupConnection(current_conn);                 
+ #endif                                                        
+ 
          while ((r = read_request(current_conn)) != NULL) {
  
  	    /* ok we've read the request... it's a little too late
***************
*** 2110,2115 ****
--- 2120,2126 ----
  {
      struct sockaddr_in sa_server;
      int saved_sd;
+     static BOOL bFirst=TRUE;
      int remaining_children_to_start;
  
      standalone = 1;
***************
*** 2131,2140 ****
  	    kill_cleanups_for_fd (pconf, scoreboard_fd);
  	}
  #endif
! 	clear_pool (pconf);
! 	ptrans = make_sub_pool (pconf);
  
- 	server_conf = read_config (pconf, ptrans, server_confname); 
  	open_logs (server_conf, pconf);
  	set_group_privs ();
  	accept_mutex_init (pconf);
--- 2142,2156 ----
  	    kill_cleanups_for_fd (pconf, scoreboard_fd);
  	}
  #endif
! 	if(!bFirst)
! 	    {
! 	    clear_pool (pconf);
! 	    ptrans = make_sub_pool (pconf);
! 	    server_conf = read_config(pconf, ptrans, server_confname); 
! 	    }
! 	else
! 	    bFirst=FALSE;
  
  	open_logs (server_conf, pconf);
  	set_group_privs ();
  	accept_mutex_init (pconf);
***************
*** 2148,2154 ****
  	}
  #endif
  
! 	default_server_hostnames (server_conf);
  
  	if (listeners == NULL) {
  	    if (!is_graceful) {
--- 2164,2170 ----
  	}
  #endif
  
! 	/*	default_server_hostnames (server_conf);*/
  
  	if (listeners == NULL) {
  	    if (!is_graceful) {
***************
*** 2393,2399 ****
      server_conf = read_config (pconf, ptrans, server_confname);
      
      if(standalone) {
!         clear_pool (pconf);	/* standalone_main rereads... */
          standalone_main(argc, argv);
      }
      else {
--- 2409,2415 ----
      server_conf = read_config (pconf, ptrans, server_confname);
      
      if(standalone) {
!     /*        clear_pool (pconf);	/* standalone_main rereads... */
          standalone_main(argc, argv);
      }
      else {






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706081949.OAA23580>